Example #1
0
 private void OnClick()
 {
     Placer.GetInstance().SetPlaceable(buildingPrefab);
     buildDrawer.SetActive(false);
     if (overlay != null)
     {
         Destroy(overlay.gameObject);
     }
 }
Example #2
0
 private void Start()
 {
     GetComponent <Button>().onClick.AddListener(() => {
         if (Placer.GetInstance().GetPlaceable() != null)
         {
             Placer.GetInstance().ClearPlaceable();
         }
         else
         {
             buildDrawer.SetActive(!buildDrawer.activeSelf);
         }
     });
 }