Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ed9dbbc52 | |||
| b810ea1d9f | |||
| 3d19509826 | |||
| 113dd0820f | |||
| fc00559483 | |||
| 0434667c22 |
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user