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