-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathComponentScript.h
More file actions
63 lines (48 loc) · 1.42 KB
/
ComponentScript.h
File metadata and controls
63 lines (48 loc) · 1.42 KB
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_SCRIPT_H__
#define __COMPONENT_SCRIPT_H__
#include "Component.h"
#include "Globals.h"
#include <string>
#include <map>
class Application;
class GameObject;
class PhysBody3D;
using namespace std;
typedef void(*f_Start)(GameObject* game_object);
typedef void(*f_Update)(GameObject* game_object);
typedef void(*f_OnCollision)(GameObject* game_object, PhysBody3D* col);
typedef void(*f_UpdateItems)(unsigned int team, int item_id, int item_size);
typedef GameObject*(*f_GetMakibishi)(int num);
class ComponentScript : public Component
{
public:
ComponentScript(ComponentType type, GameObject* game_object, const char* path);
ComponentScript(ComponentType type, GameObject* game_object);
~ComponentScript();
void Update();
void OnInspector(bool debug);
void Save(Data& file)const;
void Load(Data& conf);
void SetPath(const char* path);
const char* GetPath();
void SetGOVar(GameObject* game_object);
void OnFocus();
void OnCollision(PhysBody3D* col);
private:
string path;
bool started = false;
bool finded_start;
bool finded_update;
int script_num;
string filter = "";
DWORD error;
map<const char*, unsigned int> tmp_public_gos_uuint;
bool public_gos_to_set;
public:
map<const char*, string> public_chars;
map<const char*, int> public_ints;
map<const char*, float> public_floats;
map<const char*, bool> public_bools;
map<const char*, GameObject*> public_gos;
};
#endif // !__COMPONENT_SCRIPT_H__