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)
|
protected override void OnBuild(InputAction.CallbackContext context)
|
||||||
{
|
{
|
||||||
EnterBuildMode();
|
EnterBuildMode(buildingSelector);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PlaceStructure()
|
public void PlaceStructure()
|
||||||
|
@ -94,10 +94,11 @@ namespace AsteroidGame.Handlers
|
||||||
isBuilding = false;
|
isBuilding = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EnterBuildMode()
|
public void EnterBuildMode(int index)
|
||||||
{
|
{
|
||||||
if (isBuilding) return;
|
if (isBuilding) return;
|
||||||
isBuilding = true;
|
isBuilding = true;
|
||||||
|
SetBuildingIndex(index);
|
||||||
SpawnGhostStructure();
|
SpawnGhostStructure();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue