Vesna resets to bed after death #47
@@ -9,9 +9,15 @@ public partial class SwitchSceneOnFightEnd : Node
|
|||||||
|
|
||||||
public void OnFightStateEnter(FightHappening.FightState to)
|
public void OnFightStateEnter(FightHappening.FightState to)
|
||||||
{
|
{
|
||||||
if (to is FightHappening.FightState.PlayerWin
|
if (to is FightHappening.FightState.PlayerWin )
|
||||||
or FightHappening.FightState.EnemyWin)
|
|
||||||
_ = SwitchSceneAfterTime(2.0f);
|
_ = SwitchSceneAfterTime(2.0f);
|
||||||
|
|
||||||
|
if (to is FightHappening.FightState.EnemyWin)
|
||||||
|
{
|
||||||
|
_fightSceneSwitcher.ExitFight();
|
||||||
|
_fightSceneSwitcher.ExitFightWorld();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task SwitchSceneAfterTime(float seconds)
|
private async Task SwitchSceneAfterTime(float seconds)
|
||||||
|
|||||||
Reference in New Issue
Block a user