public override void InputHeld(object sender, InputData data) { switch (data.Input) { case GameInputs.Jump: if (VertState == VertState.Air) { if (_jumpVelLeft > 0.0f) { Vel.Y -= 1.0f; _jumpVelLeft -= 1.0f; } } break; case GameInputs.Left: if (State == State.Idle) { SetState(State.Walk, VertState.Ground); } Flip = true; Vel.X -= _moveAcc; break; case GameInputs.Right: if (State == State.Idle) { SetState(State.Walk, VertState.Ground); } Flip = false; Vel.X += _moveAcc; break; } }
public override void InputReleased(object sender, InputData data) { }
public override void InputPressed(object sender, InputData data) { switch (data.Input) { case GameInputs.Jump: if (VertState == VertState.Ground) { Vel.Y -= _jumpVelStart; _jumpVelLeft = _jumpVelMax - _jumpVelStart; SetState(State.Jump, VertState.Air); } break; } }
public void InputReleased(object sender, InputData data) { }
public void InputPressed(object sender, InputData data) { }
public void InputHeld(object sender, InputData data) { }
public virtual void InputPressed(object sender, InputData data) { switch (data.Input) { case GameInputs.Debug1: GlobalLight = !GlobalLight; break; case GameInputs.Debug2: break; case GameInputs.Debug3: break; } }