Exemple #1
0
    public void RotateButtons(bool right)
    {
        if (Input.GetKey (KeyCode.LeftArrow) || Input.GetKey (KeyCode.RightArrow))
            return;

        if (!right)
        {
            rotateDirection = E_HorizontalDirection.Left;
        }
        else
        {
            rotateDirection = E_HorizontalDirection.Right;
        }
    }
Exemple #2
0
    public void ChangeDirection(E_HorizontalDirection dir)
    {
        if (currDirection == dir)
        {
            return;
        }

        currDirection = dir;
        if (currDirection == E_HorizontalDirection.Right)
        {
            if(gameObject.transform.localScale.x < 0)
            {
                gameObject.transform.SetLocalScaleXNegative();
            }
        }
        else
        {
            if(gameObject.transform.localScale.x > 0)
            {
                gameObject.transform.SetLocalScaleXNegative();
            }
        }
    }
Exemple #3
0
 public void RotateOff()
 {
     rotateDirection = E_HorizontalDirection.None;
 }