Summary
Add update function to GameConfig. GameConfig should also take in a refreshInterval. The refreshInterval means how many milliseconds should the update function in the GameConfig be called after the game is started. If refreshInterval is 0, we should not call update. We should also stop calling update when the game ends(onEnd).
User can use this function to implement some time-based logic. For example, update the player's position every 500ms.
Create a simple demo to use this. For example, modify tic-tac-toe to display the opponent's mouse cursor at runtime.
Summary
Add
updatefunction to GameConfig. GameConfig should also take in arefreshInterval. TherefreshIntervalmeans how many milliseconds should theupdatefunction in the GameConfig be called after the game is started. IfrefreshIntervalis 0, we should not callupdate. We should also stop callingupdatewhen the game ends(onEnd).User can use this function to implement some time-based logic. For example, update the player's position every 500ms.
Create a simple demo to use this. For example, modify tic-tac-toe to display the opponent's mouse cursor at runtime.