Ejemplo n.º 1
0
    private Vector3 VectorDirection(SlotVectorDirectionType directionType)
    {
        switch (directionType)
        {
        case SlotVectorDirectionType.Up:
            return(transform.up);

        case SlotVectorDirectionType.Down:
            return(-transform.up);

        case SlotVectorDirectionType.Right:
            return(transform.right);

        case SlotVectorDirectionType.Left:
            return(-transform.right);

        case SlotVectorDirectionType.Forward:
            return(transform.forward);

        case SlotVectorDirectionType.Backward:
            return(-transform.forward);
        }

        return(Vector3.zero);
    }
Ejemplo n.º 2
0
    private Vector3 GetAxisToRotateOnRight(SlotVectorDirectionType directionType)
    {
        switch (directionType)
        {
        case SlotVectorDirectionType.Up:
            return(transform.forward);

        case SlotVectorDirectionType.Down:
            return(-transform.forward);

        case SlotVectorDirectionType.Forward:
            return(transform.up);

        case SlotVectorDirectionType.Backward:
            return(-transform.up);
        }

        return(Vector3.zero);
    }
Ejemplo n.º 3
0
    private Vector3 GetAxisToRotateOnUp(SlotVectorDirectionType directionType)
    {
        switch (directionType)
        {
        case SlotVectorDirectionType.Right:
            return(transform.forward);

        case SlotVectorDirectionType.Left:
            return(-transform.forward);

        case SlotVectorDirectionType.Forward:
            return(transform.right);

        case SlotVectorDirectionType.Backward:
            return(-transform.right);
        }

        return(Vector3.zero);
    }