Give index when entering build mode

This commit is contained in:
Stedd 2022-09-18 22:09:08 +02:00
parent 8be9c3cd70
commit 8952fb0280
1 changed files with 3 additions and 2 deletions

View File

@ -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();
}