Give index when entering build mode
This commit is contained in:
parent
8be9c3cd70
commit
8952fb0280
|
@ -75,7 +75,7 @@ namespace AsteroidGame.Handlers
|
|||
|
||||
protected override void OnBuild(InputAction.CallbackContext context)
|
||||
{
|
||||
EnterBuildMode();
|
||||
EnterBuildMode(buildingSelector);
|
||||
}
|
||||
|
||||
public void PlaceStructure()
|
||||
|
@ -94,10 +94,11 @@ namespace AsteroidGame.Handlers
|
|||
isBuilding = false;
|
||||
}
|
||||
|
||||
public void EnterBuildMode()
|
||||
public void EnterBuildMode(int index)
|
||||
{
|
||||
if (isBuilding) return;
|
||||
isBuilding = true;
|
||||
SetBuildingIndex(index);
|
||||
SpawnGhostStructure();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue