Пример #1
0
 protected void Update()
 {
     if (FpsControl.WasPressedThisFrame(FpsInput.Interact))
     {
         Activate();
     }
 }
Пример #2
0
 protected override void OnProcessEnd(float deltaTime)
 {
     if (FpsControl.WasPressedThisFrame(FpsInput.Jump))
     {
         _hero.GoToState(FpsHeroState.Jump);
     }
     else if (FpsControl.WasReleasedThisFrame(FpsInput.Run))
     {
         _hero.GoToState(FpsHeroState.Normal);
     }
 }
Пример #3
0
        protected override void OnProcessEnd(float deltaTime)
        {
            _hero.Look.LerpToHeight(_cameraHeight, 0.1f);

            if (FpsControl.WasPressedThisFrame(FpsInput.Jump))
            {
                _hero.GoToState(FpsHeroState.Jump);
            }
            else if (FpsControl.WasReleasedThisFrame(FpsInput.Crouch))
            {
                _hero.GoToState(FpsHeroState.Normal);
            }
        }
Пример #4
0
        protected override void OnProcessEnd(float deltaTime)
        {
            _hero.Look.LerpToHeight(FpsLook.BASE_HEIGHT, 0.1f);

            if (FpsControl.WasPressedThisFrame(FpsInput.Crouch))
            {
                _hero.GoToState(FpsHeroState.Crouch);
            }
            else if (FpsControl.WasPressedThisFrame(FpsInput.Jump))
            {
                _hero.GoToState(FpsHeroState.Jump);
            }
            else if (FpsControl.WasPressedThisFrame(FpsInput.Run))
            {
                _hero.GoToState(FpsHeroState.Run);
            }
            else if (FpsControl.WasPressedThisFrame(FpsInput.Sneak))
            {
                _hero.GoToState(FpsHeroState.Sneak);
            }
        }