blob: aac9e6bacdc41827730f5daf7d1b629628a1b322 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#ifndef __JIN_TOOLS_GAMEOBJECT_H
#define __JIN_TOOLS_GAMEOBJECT_H
#include "../../modules.h"
#if JIN_MODULES_TOOLS && JIN_TOOLS_COMPONENT
#include <vector>
#include "Component.h"
namespace jin
{
namespace tools
{
class GameObject
{
public:
GameObject()
: components()
{
}
virtual void update(float dt)
{
for each (Component* component in components)
component->update(dt);
}
virtual void draw() = 0;
protected:
std::vector<Component*> components;
};
} // tools
} // jin
#endif // JIN_MODULES_TOOLS && JIN_TOOLS_COMPONENT
#endif // __JIN_TOOLS_GAMEOBJECT_H
|