Esempio 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);
     }
 }
Esempio n. 2
0
 void RemovePlaceholder(BuildingSetup instance)
 {
     GameObject.Destroy(instance.Placeholder.gameObject);
     instance.Placeholder = null;
 }