Exemple #1
0
        private void FixedUpdate()
        {
            bool  crouch = CrossPlatformInputManager.GetButton("Crouch");
            float h1     = CrossPlatformInputManager.GetAxis("Horizontal");

            character.Move(h1, crouch, jump);
            jump = false;
        }
        private void FixedUpdate()
        {
            bool  crouch = Input.GetKey(KeyCode.LeftControl);                                                                                   // Read the inputs.
            float h      = CrossPlatformInputManager.GetAxis("Horizontal");

            character.Move(h, crouch, jump);                                                                                                                    // Pass all parameters to the character control script.
            jump = false;
        }
        private void FixedUpdate()
        {
            // Read the inputs.
            float h = Input.GetAxis("Horizontal");

            // Pass all parameters to the character control script.
            character.Move(h, false, jump);
            jump = false;
        }
 private void FixedUpdate()
 {
     // Read the inputs.
     // bool crouch = Input.GetKey(KeyCode.LeftControl);
     // float h = CrossPlatformInputManager.GetAxis("Horizontal");
     // Pass all parameters to the character control script.
     character.Move(speed, false, jump, jumpHold);
     jump = false;
 }
        private void FixedUpdate()
        {
            // Read the inputs.
            bool  crouch = Input.GetKey(KeyCode.RightControl);
            float h      = Input.GetAxis("Horizontal2");

            // Pass all parameters to the character control script.
            character.Move(h, crouch, jump);
            jump = false;
        }
        private void FixedUpdate()
        {
            float h = CrossPlatformInputManager.GetAxis("Horizontal");
            float v = CrossPlatformInputManager.GetAxis("Vertical");

            // Pass all parameters to the character control script.
            character.Move(h, jump);
            character.Climb(v);
            jump = false;
        }
Exemple #7
0
        private void FixedUpdate()
        {
            if (playerNumber == 2)
            {
                moveMap = "Horizontal1";
            }
            else if (playerNumber == 1)
            {
                moveMap = "Horizontal";
            }
            // Read the inputs.
            bool  crouch = Input.GetKey(KeyCode.LeftControl);
            float h      = CrossPlatformInputManager.GetAxis(moveMap);

            // Pass all parameters to the character control script.
            character.Move(h, crouch, jump);
            jump = false;
        }
        private void FixedUpdate()
        {
            // Read the inputs.

            bool crouch = false; //=Input.GetKey(KeyCode.LeftControl);

            if (joyStickL.Vertical() < -0.5)
            {
                crouch = true;
            }

            float h = joyStickL.Horizontal();

            //float h = CrossPlatformInputManager.GetAxis("Horizontal");
            // Pass all parameters to the character control script.
            character.Move(h, crouch, jump);
            jump   = false;
            crouch = false;
        }
Exemple #9
0
        private void FixedUpdate()
        {
            InputDevice player = InputManager.Devices[0];

            if (!jump)
            {
                // Read the jump input in Update so button presses aren't missed.
                jump = player.Action2.WasPressed;
            }
            //jump = CrossPlatformInputManager.GetButtonDown("Jump");

            // Read the inputs.
            bool crouch = Input.GetKey(KeyCode.LeftControl);

            InputControl movecontrol = player.GetControl(InputControlType.LeftStickX);
            float        h           = movecontrol.Value;

            // Pass all parameters to the character control script.
            character.Move(h, crouch, jump);
            jump = false;
        }
        private void FixedUpdate()
        {
            // Read the inputs.
            float h = CrossPlatformInputManager.GetAxis("Horizontal");

            // Pass all parameters to the character control script.
            character.Move(h, jump, CrossPlatformInputManager.GetButton("Jump"));
            jump = false;
            character.Shoot(shoot);
            shoot = false;
            if (action)
            {
                if (InteractionObj != null)
                {
                    if (Time.time > lastInteract + InteractDelay)
                    {
                        lastInteract = Time.time;
                        InteractionObj.TryInteract(this);
                    }
                }
                action = false;
            }
        }