public void PostUpdate(ulong updateTick, float deltaTime) { // Apply post-processing to controls. foreach (InputControl control in Controls.IgnoreNulls()) { if (control.RawValue != null) { control.UpdateWithValue(control.RawValue.Value, updateTick); } else if (control.PreValue != null) { control.UpdateWithValue(ProcessAnalogControlValue(control, deltaTime), updateTick); } control.PostUpdate(updateTick); if (control.HasChanged) { LastChangeTick = updateTick; } } // Update two-axis controls. LeftStick.Update(LeftStickX, LeftStickY, updateTick); RightStick.Update(RightStickX, RightStickY, updateTick); Vector2 dpv = DPadVector; DPad.Update(dpv.x, dpv.y, updateTick); }
public void Update(float delta) { if (!controllerInitted) { return; } RightStick.Update(); LeftStick.Update(); }
public void Update(float delta) { GameController.Update(delta); PcController.Update(delta); PcAltController.Update(delta); RightStick.Update(); LeftStick.Update(); //Updating Dpad to use it's joystick emulator _actionDPad.Update(delta); //Updating KeyboardOnlyDpad to use it's joystick emulator _keyboardDPad.Update(delta); UpdateSticks(); }
public void PostUpdate(ulong updateTick, float deltaTime) { // Apply post-processing to controls. int controlCount = Controls.GetLength(0); for (int i = 0; i < controlCount; i++) { var control = Controls[i]; if (control != null) { if (control.RawValue.HasValue) { control.UpdateWithValue(control.RawValue.Value, updateTick); } else if (control.PreValue.HasValue) { control.UpdateWithValue(ProcessAnalogControlValue(control, deltaTime), updateTick); } control.PostUpdate(updateTick); if (control.HasChanged) { LastChangeTick = updateTick; } } } // Update two-axis controls. LeftStick.Update(LeftStickX, LeftStickY, updateTick); RightStick.Update(RightStickX, RightStickY, updateTick); var dpv = DPadVector; DPad.Update(dpv.x, dpv.y, updateTick); }