Exemplo n.º 1
0
    void FixedUpdate()
    {
        if (CurrentMode == Mode.Playing)
        {
            float h = CrossPlatformInput.GetAxis("Horizontal");

            // Pass all parameters to the character control script.
            character.Move(h, jump);

            // Reset the jump input once it has been used.
            jump = false;

            // Check if we need to rotate the level
            if (rotationDirection != RotateDirection.None)
            {
                // Rotate the room
                rotateEverything.Rotate(rotationDirection);
                gravityAudio.Play();
                rotationDirection = RotateDirection.None;
            }
        }
    }