December 2004
Beginner
432 pages
10h 17m
English
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.
/// <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 ... |
Read now
Unlock full access