Writing the Player Object
One of the more important aspects of the player is to render it onscreen. You probably already realize that you've got the mesh loaded and already rendering in the select-your-character screen, so it wouldn't make sense to go through the entire loading process again. Instead, you use the objects you've already loaded during that screen. To do so, you need to add a few properties to your SelectLoopyScreen class:
/// <summary> /// Return the mesh that represents loopy /// </summary> public Mesh LoopyMesh { get { return loopyMesh; } } /// <summary> /// Return the texture that represents loopy's /// color /// </summary> public Texture LoopyTexture { get { return loopyTexture; } } /// <summary> /// Return loopy's material ...
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.