Esempio n. 1
0
 public void OnBoatSwiped(Vector3 start, Vector3 end, Coast coast)
 {
     if (!Level.IsBusy)
     {
         Level.IsBusy = true;
         StartCoroutine(RawTo(coast.BoatDock));
     }
 }
Esempio n. 2
0
 public void OnActorClicked(Actor actor, Vector3 start, Vector3 end)
 {
     if (!Level.IsBusy)
     {
         Coast coast = CurrentDock.transform.parent.GetComponent <Coast>();
         StartCoroutine(LaneCoast(coast, actor, start, end));
         Level.IsBusy = true;
     }
 }
Esempio n. 3
0
 public void OnBoatSwiped(Vector3 start, Vector3 end, Coast coast)
 {
     if ((end.x - start.x > 0 && Location == CoastLocation.LeftCoast) || (end.x - start.x < 0 && Location == CoastLocation.RightCoast))
     {
         if (this.name == LeftCoast.name)
         {
             coast = RightCoast;
         }
         else
         {
             coast = LeftCoast;
         }
         MainBoat.transform.parent = coast.transform;
         ExecuteEvents.Execute <IBoatSwipeHandler>(MainBoat.gameObject, null, (x, y) => x.OnBoatSwiped(start, end, coast));
     }
 }
Esempio n. 4
0
        private IEnumerator LaneCoast(Coast coast, Actor actor, Vector3 start, Vector3 end)
        {
            yield return(StartCoroutine(coast.LaneActor(actor, start, end)));

            Level.IsBusy = false;
        }