示例#1
0
    public virtual void applyMovement()
    {
        if (horizontalState == Direction.left)
        {
            m_moveable.moveLeft();
        }

        if (horizontalState == Direction.right)
        {
            m_moveable.moveRight();
        }

        if (verticalState == Direction.up)
        {
            m_moveable.moveUp();
        }

        if (verticalState == Direction.down)
        {
            m_moveable.moveDown();
        }

        if (verticalState == Direction.none)
        {
            m_moveable.moveNone();
        }
    }