public IEnumerator SetPlayerMoveRoute(MoveRoutePackage package) { MoveableCharacter character = event_manager.GetPlayerMover(); yield return(new WaitUntil(() => !character.GetInMoveRoute())); StartCoroutine(character.StartMoveRoute(package.move_route)); if (package.wait_for_moves_completion) { yield return(new WaitUntil(() => !character.GetInMoveRoute())); } effect_playing = false; }
// TODO: ShowMessageBubble that takes in a moveable character as well, makes bubble speech public IEnumerator SetMoveRoute(MoveableCharacter character, MoveRoutePackage package) { if (character == null) { character = GetComponent <MoveableCharacter>(); } yield return(new WaitUntil(() => !character.GetInMoveRoute())); StartCoroutine(character.StartMoveRoute(package.move_route)); if (package.wait_for_moves_completion) { yield return(new WaitUntil(() => !character.GetInMoveRoute())); } effect_playing = false; }