December 2015
Beginner to intermediate
522 pages
11h 21m
English
So far, we only have entities that define some abstract methods and provide the means of manipulating them, but nothing that can appear in the game world, be rendered, and walk around. At the same time, we don't want to re-implement all of that functionality all over again in the player or enemy classes, which means we need an intermediate-level abstract class: Character. This class will provide all of the functionality that is shared between all entities that need to move around the world and be rendered. Let's get on with designing:
class Character : public EntityBase{ friend class EntityManager; public: Character(EntityManager* l_entityMgr); virtual ~Character(); void Move(const Direction& l_dir); void Jump(); ...Read now
Unlock full access