public void OnBoatSwiped(Vector3 start, Vector3 end, Coast coast) { if (!Level.IsBusy) { Level.IsBusy = true; StartCoroutine(RawTo(coast.BoatDock)); } }
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; } }
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)); } }
private IEnumerator LaneCoast(Coast coast, Actor actor, Vector3 start, Vector3 end) { yield return(StartCoroutine(coast.LaneActor(actor, start, end))); Level.IsBusy = false; }