/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { if (!IsReadyToUpdate) { return; } // Update the time since the last frame and the game's clock. TimeSinceLastFrame = gameTime.ElapsedGameTime.TotalMilliseconds; TimeRunningPrecise += gameTime.ElapsedGameTime.TotalMilliseconds; Drawable.ResetTotalDrawnCount(); // Keep the window updated with the current resolution. WindowManager.Update(); MouseManager.Update(); KeyboardManager.Update(); JoystickManager.Update(); ScreenManager.Update(gameTime); AudioManager.Update(gameTime); // Update the global sprite container GlobalUserInterface.Update(gameTime); // Keep the RPC client up-to-date. DiscordManager.Client?.Invoke(); LogManager.Update(gameTime); Logger.Update(); base.Update(gameTime); }
public async Task UpdateJoystick() { var rep = CreateMock <IDynItemController>(); var ctrl = new JoystickManager(rep); var joystick = new Joystick { SerialServer = "Entry1", Id = 1, SerialServerUser = "******" }; await ctrl.Update(joystick); await rep.Received().Save(Arg.Is <int>(x => x == 1), Arg.Is <string>(x => x == "Joystick1"), Arg.Is <Joystick>(x => x.SerialServer == "Entry1" && x.SerialServerUser == "HA")); }