Exemplo n.º 1
0
 public void OnPointerUp(PointerEventData pointerEventData)
 {
     if (dragging != null && pointerEventData.button == 0)
     {
         dragging.StopDragging();
         dragging = null;
     }
 }
Exemplo n.º 2
0
 void OnCountChange()
 {
     if (waiting == null && count > 0)
     {
         GameObject created = GameObject.Instantiate(deployedMercPrefab, transform);
         waiting           = created.GetComponent <DeployedMerc>();
         waiting.behaviour = behaviour.Copy();
         waiting.parent    = this;
     }
     else if (waiting != null && count <= 0)
     {
         Destroy(waiting.gameObject);
         waiting = null;
     }
 }