Ejemplo n.º 1
0
    int CheckForUnlockedPaths(PlayerController.Moves mLocked)
    {
        int path = (int)mLocked;

        for (int i = 0; i < (int)PlayerController.Moves.last; i++)
        {
            if (!lockedWays[i])
            {
                path = i;
            }
        }
        return(path);
    }
Ejemplo n.º 2
0
    Vector3 DirectionSelector(PlayerController.Moves m)
    {
        switch (m)
        {
        case PlayerController.Moves.up:
            return(new Vector3(0, 0, 1));

        case PlayerController.Moves.down:
            return(new Vector3(0, 0, -1));

        case PlayerController.Moves.left:
            return(new Vector3(-1, 0, 0));

        case PlayerController.Moves.right:
            return(new Vector3(1, 0, 0));

        default:
            return(new Vector3(0, 0, 1));
        }
    }