Skip to content

Commit

Permalink
결과창 중복 수정 (#153)
Browse files Browse the repository at this point in the history
결과창 중복 수정
  • Loading branch information
suyeon-ham-01 authored May 14, 2024
1 parent 7843d5d commit 797af4b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
6 changes: 5 additions & 1 deletion Client/Assets/Scripts/Contents/Map/GameClearPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ private void OnTriggerEnter(Collider other)
if (other.CompareTag("Player"))
{
Crew creature = other.GetComponent<Crew>();
creature.OnWin();
if (creature != null )
{
creature.OnWin();
}

}
}
}
7 changes: 7 additions & 0 deletions Client/Assets/Scripts/Creatures/Crew.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ public void Rpc_OnSanityDamaged(float value)

public void OnDefeat()
{
if (!HasStateAuthority || CreatureType != Define.CreatureType.Crew)
return;

CreatureState = Define.CreatureState.Dead;

CrewAnimController.PlayAnim(Define.CrewActionType.Dead);
Expand All @@ -276,12 +279,16 @@ public void Rpc_OnDefeat()

public void OnWin()
{
if (!HasStateAuthority || CreatureType != Define.CreatureType.Crew)
return;

CreatureState = Define.CreatureState.Idle;

CrewSoundController.StopAllSound();
CrewSoundController.PlayEndGame();

Managers.GameMng.GameEndSystem.EndCrewGame(true);

CrewIngameUI.HideUI();
CrewIngameUI.EndGame();

Expand Down
9 changes: 3 additions & 6 deletions Client/ProjectSettings/EditorBuildSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/Scenes/TestScene/TestScene_SJ.unity
guid: 859eeef4fbdc5304a8acd812969ada68
- enabled: 1
path: Assets/Scenes/LobbyScene.unity
guid: 313716ee8bf524042a1788a7d3eb73ad
- enabled: 1
path: Assets/Scenes/TestScene/TestScene_HSY.unity
guid: 18004f7f87ac1594aaf8926b3702283b
- enabled: 1
path: Assets/Scenes/ReadyScene.unity
guid: e56f48c222531e446828bb61255cce9b
Expand All @@ -26,7 +26,4 @@ EditorBuildSettings:
- enabled: 0
path: Assets/Scenes/TestScene/Test_Scene.unity
guid: fbe5e0b4f59c54e47a6409e0656c78d7
- enabled: 0
path: Assets/Scenes/TestScene/LargeTestScene.unity
guid: 688f320805e0857429cc1d147941f9b7
m_configObjects: {}

0 comments on commit 797af4b

Please sign in to comment.