Пример #1
0
 public void DropPassanger()
 {
     if (selected)
     {
         selected.gameObject.SetActive(true);
         selected = null;
         Destroy(moveOne);
         moveOne = null;
     }
 }
Пример #2
0
 public void OnPassengerClicked(PointerEventData eventData, DPassenger psg)
 {
     if (!selected && psg.IsClicked(eventData))
     {
         selected                 = psg;
         this.moveOne             = GameObject.Instantiate(selected.gameObject);
         moveOne.transform.parent = this.transform;
         selected.gameObject.SetActive(false);
         moveOne.GetComponent <RectTransform>().pivot = new Vector2(0.5f, 0.5f);
     }
     else
     {
         DropPassanger();
     }
 }