a bit more stuff
This commit is contained in:
@@ -5,7 +5,7 @@ namespace NodeWar;
|
||||
|
||||
public partial class BuildManager : Node
|
||||
{
|
||||
private bool Building { get; set; }
|
||||
public bool IsBuilding { get; set; }
|
||||
|
||||
private Nodule BuildingNodule { get; set; }
|
||||
|
||||
@@ -20,7 +20,7 @@ public partial class BuildManager : Node
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (Input.IsActionJustPressed(Scripts.Globals.MyInput.Build) && !Building)
|
||||
if (Input.IsActionJustPressed(Scripts.Globals.MyInput.Build) && !IsBuilding)
|
||||
{
|
||||
StartBuilding();
|
||||
}
|
||||
@@ -30,18 +30,18 @@ public partial class BuildManager : Node
|
||||
{
|
||||
BuildingNodule = Instantiator.Instantiate<Nodule>();
|
||||
|
||||
Building = true;
|
||||
IsBuilding = true;
|
||||
BuildingNodule.BuildMode = true;
|
||||
|
||||
BuildingNodule.NoduleBuilt += () =>
|
||||
{
|
||||
Building = false;
|
||||
IsBuilding = false;
|
||||
BuildingNodule = null;
|
||||
};
|
||||
|
||||
BuildingNodule.BuildingCanceled += () =>
|
||||
{
|
||||
Building = false;
|
||||
IsBuilding = false;
|
||||
BuildingNodule = null;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user