parent
e5e0f03e3d
commit
3a364e953a
@ -382,6 +382,22 @@ namespace BlueWaterProject
|
||||
Rb.isKinematic = true;
|
||||
}
|
||||
Agent.enabled = false;
|
||||
|
||||
if (GameManager.Inst.CurrentInIslandPlayer == (IInIslandPlayer)this)
|
||||
{
|
||||
foreach (var crewmate in GameManager.Inst.CurrentCrewmateList)
|
||||
{
|
||||
if (crewmate == null || !crewmate.gameObject.activeSelf || crewmate.CurrentHp <= 0) continue;
|
||||
|
||||
GameManager.Inst.SetCurrentInIslandPlayer(crewmate);
|
||||
return;
|
||||
}
|
||||
|
||||
// 게임 종료
|
||||
var overlayCanvas = GameObject.Find("OverlayCanvas");
|
||||
overlayCanvas.transform.Find("RestartPopUp").gameObject.SetActive(true);
|
||||
return;
|
||||
}
|
||||
|
||||
Destroy(hpSlider.gameObject, 2f);
|
||||
Destroy(gameObject, 2f);
|
||||
@ -489,11 +505,7 @@ namespace BlueWaterProject
|
||||
|
||||
public void OnMove(InputValue value)
|
||||
{
|
||||
if (CurrentHp <= 0)
|
||||
{
|
||||
Rb.velocity = Vector3.zero;
|
||||
return;
|
||||
}
|
||||
if (CurrentHp <= 0) return;
|
||||
|
||||
movementInput = value.Get<Vector2>();
|
||||
}
|
||||
|
@ -366,6 +366,8 @@ namespace BlueWaterProject
|
||||
}
|
||||
Agent.enabled = false;
|
||||
|
||||
var overlayCanvas = GameObject.Find("OverlayCanvas");
|
||||
|
||||
switch (GameManager.Inst.IslandPlayerMode)
|
||||
{
|
||||
case GlobalValue.InIslandPlayerMode.NONE:
|
||||
@ -373,7 +375,8 @@ namespace BlueWaterProject
|
||||
break;
|
||||
case GlobalValue.InIslandPlayerMode.ONLY_PLAYER:
|
||||
// 게임 종료
|
||||
break;
|
||||
overlayCanvas.transform.Find("RestartPopUp").gameObject.SetActive(true);
|
||||
return;
|
||||
case GlobalValue.InIslandPlayerMode.CREWMATE:
|
||||
foreach (var crewmate in GameManager.Inst.CurrentCrewmateList)
|
||||
{
|
||||
@ -382,9 +385,9 @@ namespace BlueWaterProject
|
||||
GameManager.Inst.SetCurrentInIslandPlayer(crewmate);
|
||||
return;
|
||||
}
|
||||
|
||||
// 게임 종료
|
||||
break;
|
||||
overlayCanvas.transform.Find("RestartPopUp").gameObject.SetActive(true);
|
||||
return;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
@ -452,11 +455,7 @@ namespace BlueWaterProject
|
||||
|
||||
public override void OnMove(InputValue value)
|
||||
{
|
||||
if (CurrentHp <= 0)
|
||||
{
|
||||
Rb.velocity = Vector3.zero;
|
||||
return;
|
||||
}
|
||||
if (CurrentHp <= 0) return;
|
||||
|
||||
base.OnMove(value);
|
||||
}
|
||||
|
@ -25,13 +25,13 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4974917693782220124}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.6532815, y: 0.27059805, z: -0.27059805, w: 0.6532815}
|
||||
m_LocalRotation: {x: 0.86602545, y: 0, z: 0, w: 0.49999994}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 2, y: 2, z: 2}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2677528810302803348}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: -45}
|
||||
m_LocalEulerAnglesHint: {x: 120, y: 0, z: 0}
|
||||
--- !u!212 &2067129615080396003
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
|
Loading…
Reference in New Issue
Block a user