TryJump() public method

public TryJump ( ) : void
return void
Exemplo n.º 1
0
        void Update()
        {
            if (model == null)
            {
                return;
            }

            float currentHorizontal = Input.GetAxisRaw(horizontalAxis);

            model.TryMove(currentHorizontal);

            if (Input.GetButton(attackButton))
            {
                model.TryShoot();
            }

            if (Input.GetButtonDown(aimButton))
            {
                model.StartAim();
            }
            if (Input.GetButtonUp(aimButton))
            {
                model.StopAim();
            }

            if (Input.GetButtonDown(jumpButton))
            {
                model.TryJump();
            }
        }
Exemplo n.º 2
0
        void Update()
        {
            if (model == null)
            {
                return;
            }

            float currentHorizontal = UnityEngine.Input.GetAxisRaw(horizontalAxis);

            model.TryMove(currentHorizontal);

            if (UnityEngine.Input.GetButton(attackButton))
            {
                model.TryShoot();
            }

            if (UnityEngine.Input.GetButtonDown(jumpButton))
            {
                model.TryJump();
            }
        }