April 2017
Beginner to intermediate
394 pages
9h 16m
English
Now that we have seen the interface, let's look at two very important components. These are important because they allow game objects to interact with two of the other core pieces of our engine, graphics and physics.
The first one we will look at is the GfxComponent class. This class allows the game object to have a visual representation in the game. It contains the two minimum pieces of information to draw an object in the game:
//GfxComponent.h enum DrawSpace { DS_WORLD, DS_HUD }; class GfxComponent : public M5Component { public: GfxComponent(void); ~GfxComponent(void); void Draw(void) const; virtual void Update(float dt); virtual GfxComponent* Clone(void) const; virtual void FromFile(M5IniFile& ...Read now
Unlock full access