42 lines
654 B
C++
42 lines
654 B
C++
/*
|
|
* Component.h
|
|
*
|
|
* Created on: Nov 30, 2016
|
|
* Author: tibi
|
|
*/
|
|
|
|
#ifndef COMPONENT_H_
|
|
#define COMPONENT_H_
|
|
|
|
#include <SDL2/SDL.h>
|
|
|
|
namespace farmlands {
|
|
namespace base {
|
|
|
|
class GameObject;
|
|
|
|
class Component
|
|
{
|
|
public:
|
|
Component();
|
|
virtual ~Component();
|
|
|
|
// Game object methods
|
|
virtual void onCreate();
|
|
virtual void onInitialize();
|
|
virtual bool onEvent(SDL_Event& event);
|
|
virtual void onUpdateLogic();
|
|
virtual void onPreRender();
|
|
virtual void onRender();
|
|
virtual void onPostRender();
|
|
virtual void onDestroy();
|
|
|
|
GameObject* gameObject;
|
|
};
|
|
|
|
}
|
|
/* namespace base */
|
|
} /* namespace farmlands */
|
|
|
|
#endif /* COMPONENT_H_ */
|