Beispiel #1
0
        private void ReactToInput(float x)
        {
            var isRight = x >= Screen.width / 2f;

            if (Swap)
            {
                if (isRight)
                {
                    PlayerController.RotateRight();
                }
                else
                {
                    PlayerController.RotateLeft();
                }
            }
            else
            {
                if (isRight)
                {
                    PlayerController.RotateLeft();
                }
                else
                {
                    PlayerController.RotateRight();
                }
            }
        }