Ejemplo n.º 1
0
 protected void Update()
 {
     if (FpsControl.WasPressedThisFrame(FpsInput.Interact))
     {
         Activate();
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
            }
        }