public override void SimulateController() { // If player is "dead" ignore inputs if (state.Health <= 0) { return; } var cmd = MoveAndShootMoveCommand.Create(); cmd.Direction = _input.Dir; cmd.Yaw = _input.Angle; entity.QueueInput(cmd); if (_input.Fired.HasValue) { var fireCommandInput = MoveAndShootFireCommand.Create(); fireCommandInput.Type = _input.Fired.Value; entity.QueueInput(fireCommandInput); // reset fire input _input.Fired = null; } }