Compare commits

...

6 Commits

2 changed files with 9 additions and 2 deletions
@@ -168,6 +168,7 @@ theme_override_constants/margin_left = 200
theme_override_constants/margin_right = 200 theme_override_constants/margin_right = 200
[node name="MarginContainer" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer2"] [node name="MarginContainer" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer2"]
visible = false
layout_mode = 2 layout_mode = 2
theme_override_constants/margin_left = 10 theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10 theme_override_constants/margin_top = 10
@@ -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)