Last active
March 14, 2017 14:26
ComponentBase Class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _COMPONENTBASE_H | |
#define _COMPONENTBASE_H | |
#define WIN32_LEAN_AND_MEAN | |
class ComponentBase; | |
class GameObject; | |
class ComponentBase | |
{ | |
private: | |
GameObject* mOwnerGO; | |
public: | |
typedef std::string goc_id_type; | |
ComponentBase() : mOwnerGO(NULL) {} | |
virtual ~ComponentBase() {} | |
virtual const goc_id_type& componentID() const = 0; | |
virtual const goc_id_type& familyID() const = 0; | |
void setOwnerGO(GameObject* go) { mOwnerGO = go; } | |
GameObject* getOwnerGO() const { return mOwnerGO; } | |
virtual void intialize(); | |
virtual void start(); | |
virtual void update(float frameTime); | |
virtual void render(); | |
virtual void ai(); | |
virtual void collisions(); | |
virtual void communicate(); | |
}; | |
#endif // !_COMPONENTBASE_H |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment