Now, we can specialize
RealTimeGame instead of using subclasses of
Game. This requires a small change to the code. We have to override the
UpdateWithTime method instead of overriding the
Update method. Besides, we have to remove the line
base.Update(); used in the
Update method. These changes will allow us to animate 3D characters taking into account the elapsed time.
InvadersGameclass with this one. (Now, it will be a subclass of
public class InvadersGame : RealTimeGame
Updatemethod with the following. (Now, we override the
UpdateWithTimemethod instead.): ...