void DoEvent()
    {
        /* Halt Control Over the Player */
        player.isControllable = false;

        /* Play Sound */
        SoundManager.instance.PlaySound("Exit Area");

        /* Warp Player */
        overworld.WarpPlayer(warpTile);
    }
Beispiel #2
0
    IEnumerator EnterDoor()
    {
        /* Halt Control Over the Player */
        player.isControllable = false;

        /* Open Door */
        yield return(StartCoroutine(SetOpenState(true)));

        /* Move Player Into Door */
        yield return(StartCoroutine(player.Move(Vector2.up, player.walkingSpeed)));

        /* Stop Player */
        player.UpdateAnimation(Vector2.up, 0f);

        /* Warp Player */
        overworld.WarpPlayer(warpTile);
    }
Beispiel #3
0
    public IEnumerator EnterStairs()
    {
        /* Halt Control Over the Player */
        player.isControllable = false;

        /* Walk 3 steps */
        for (int i = 0; i < 3; i++)
        {
            yield return(StartCoroutine(player.Move(player.motion.dir, 2f, 0.393f)));

            player.transform.position += Vector3.up * 0.196f * (float)direction;
        }

        /* Play Sound */
        SoundManager.instance.PlaySound("Exit Area");

        /* Warp Player */
        overworld.WarpPlayer(otherStairs);
    }