Implement even more inventory/UI stuff
This commit is contained in:
@@ -50,8 +50,6 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
private List<IDungeonFloor> Floors;
|
||||
|
||||
private int _currentFloor = -1;
|
||||
|
||||
public void Setup()
|
||||
{
|
||||
GameRepo = new GameRepo();
|
||||
@@ -88,7 +86,7 @@ public partial class Game : Node3D, IGame
|
||||
.Handle((in GameLogic.Output.LoadNextFloor _) =>
|
||||
{
|
||||
AnimationPlayer.Play("wait_and_load");
|
||||
var currentFloor = Floors.ElementAt(_currentFloor);
|
||||
var currentFloor = Floors.ElementAt(GameRepo.CurrentFloor);
|
||||
currentFloor.CallDeferred(MethodName.QueueFree, []);
|
||||
|
||||
if (GameRepo.EquippedWeapon.Value.WeaponInfo != null && GameRepo.EquippedWeapon.Value.WeaponInfo.WeaponTags.Contains(WeaponTag.BreaksOnChange))
|
||||
@@ -120,7 +118,7 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
private void AnimationPlayer_AnimationStarted(StringName animName)
|
||||
{
|
||||
var newFloor = Floors.ElementAt(_currentFloor + 1);
|
||||
var newFloor = Floors.ElementAt(GameRepo.CurrentFloor + 1);
|
||||
newFloor.CallDeferred(nameof(newFloor.InitializeDungeon), []);
|
||||
newFloor.Show();
|
||||
}
|
||||
@@ -129,7 +127,7 @@ public partial class Game : Node3D, IGame
|
||||
{
|
||||
var spawnPoints = GetTree().GetNodesInGroup("Exit").OfType<Marker3D>();
|
||||
Teleport.GlobalPosition = spawnPoints.Last().GlobalPosition;
|
||||
_currentFloor++;
|
||||
GameRepo.CurrentFloor++;
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
|
||||
Reference in New Issue
Block a user