コード例 #1
0
ファイル: Event.cs プロジェクト: rsmith52/Pokemon-for-Unity
        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;
        }
コード例 #2
0
ファイル: Event.cs プロジェクト: rsmith52/Pokemon-for-Unity
        // 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;
        }