Exemple #1
0
 public void touchEnded()
 {
     isCreatingPath = false;
     if (!touchLandingTrigger)
     {
         return;
     }
     Destroy(touchLandingTrigger.gameObject);
     touchLandingTrigger = null;
 }
Exemple #2
0
 public void touchBegan(Vector3 touchPosition)
 {
     if (GameController.Instance.isGameOver)
     {
         return;
     }
     if (spaceCarrier.isInDeliveryProcess)
     {
         touchEnded();
         return;
     }
     ;
     carrierSelected.Play();
     setDefaultColor();
     touchLandingTrigger = Instantiate(TouchLandingTriggerPrefab, touchPosition, Quaternion.identity).GetComponent <TouchLandingTrigger>();
     touchLandingTrigger.register(spaceCarrier);
     isCreatingPath         = true;
     pathLine.positionCount = 1;
     pathLine.SetPosition(0, touchPosition);
 }