Exemplo n.º 1
0
 //used to add an element to a capture zone when clicked
 public void enqueueElement(string elementName)
 {
     if (lastZone == CaptureZone.Zone1)
     {
         zone2Capturer.captureElement(GlobalVars.ELEMENT_SPRITES[elementName]);
         lastZone = CaptureZone.Zone2;
     }
     else if (lastZone == CaptureZone.Zone2)
     {
         zone1Capturer.captureElement(GlobalVars.ELEMENT_SPRITES[elementName]);
         lastZone = CaptureZone.Zone1;
     }
 }
Exemplo n.º 2
0
 // Captures the script if its dropped
 void OnDestroy()
 {
     if (capturer != null && !Input.GetMouseButton(0))
     {
         capturer.captureElement(transform.GetComponent <Image>().sprite);
     }
 }