Exemplo n.º 1
0
 void OnBuildingPlaced(BuildingSetup instance, bool confirm)
 {
     if (confirm)
     {
         RemovePlaceholder(instance);
         instance.Body.SetActive(true);
         AssignNewId(instance.State);
         instance.State.enabled = true;
     }
     else
     {
         GameObject.Destroy(instance.gameObject);
     }
 }
Exemplo n.º 2
0
 void RemovePlaceholder(BuildingSetup instance)
 {
     GameObject.Destroy(instance.Placeholder.gameObject);
     instance.Placeholder = null;
 }