-
Notifications
You must be signed in to change notification settings - Fork 0
/
Component.h
63 lines (45 loc) · 1.5 KB
/
Component.h
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef COMPONENT_H
#define COMPONENT_H
#include <vector>
#include <utility>
class GameObject;
class Component // IMPORTANT NOTE! Components are a point of access and will not be preforming any major function
{
public:
Component();
~Component();
Component(Component&);
virtual void Update();
virtual void AddToGameObject(GameObject&);
protected:
};
class Renderer : public Component // this class is simply a link between an object renderer and the scene renderer!
{
public:
//Update will link object to the scene renderer BUT WILL NOT RENDER ANYTHING TO BACKBUFFER
//functions allowing smooth transition between the scene and objects
protected:
//access to the OpenGL interface or whatever
//pointer to vertex buffer of object? (either that or some method of determining where the object drawing is located
//OR for the purpose of a Colsole char Symbol;
};
class Transform : public Component
{
public:
//update will calculate move by applying the 2D vector force and applying the friction constant to slow down force vector.
//move funciton?
protected:
//std::pair<float, float> _2D_VectorSpace; // Magnitude, Direction THIS MAY NOT BE NECESSARY FOR MOST GAMES
float _rotation;
float _size;
};
/* //Behavior class will update any behavior that is contained within the object
class Behavior : public Component
{
public:
//to be discovered
protected:
//child classes may be different behavior types?
};
*/
#endif