🐛Make the FightWorld reset when sleeping in the bed
This commit is contained in:
@@ -72,7 +72,6 @@ public partial class FightWorld : Node
|
||||
public override void _EnterTree()
|
||||
{
|
||||
Instance = this;
|
||||
MyEnterTree();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -82,7 +81,7 @@ public partial class FightWorld : Node
|
||||
public FightHappeningData? fightHappeningData = null;
|
||||
public AllyFighters allyFighters = new();
|
||||
|
||||
public void MyEnterTree()
|
||||
public void ResetFightWorld()
|
||||
{
|
||||
Generate();
|
||||
currentRoom = world!.rooms[0];
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using Babushka.scripts.CSharp.Common.Fight;
|
||||
|
||||
public partial class NightStarter : Node
|
||||
{
|
||||
[Export] private int _sceneIndexToLoad;
|
||||
|
||||
[Signal] public delegate void LoadSceneEventHandler(int index);
|
||||
|
||||
public void StartNight()
|
||||
{
|
||||
FightWorld.Instance.ResetFightWorld();
|
||||
EmitSignalLoadScene(_sceneIndexToLoad);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://puw74w6lmcvl
|
||||
Reference in New Issue
Block a user