IMoveableObject Indeed
Have you noticed that you haven't implemented the IMoveableObject members yet? If you've tried to compile, you have because you can't compile the class until you do. Listing 14.9 contains the implementation of these members.
Listing 14.9. IMoveableObject Implementation
/// <summary> /// Draw the player (the tank) in the world /// </summary> /// <param name="device">Device used to render tank</param> public void Draw(GameEngine engine, Camera c) { if (gameTank != null) { // Only draw the tank if it lies in the view frustum if (c.ObjectInFrustum(this)) { gameTank.Draw(engine); } } } /// <summary> /// The tank's current position /// </summary> public Vector3 Position { get { return gameTank.Position; } set { gameTank.Position ... |
Get Beginning 3D Game Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.