forked from hoijui/KAIK
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathKAIK.h
56 lines (42 loc) · 1.32 KB
/
KAIK.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
#ifndef KAIK_GLOBALAI_HDR
#define KAIK_GLOBALAI_HDR
#include <fstream>
#include "System/float3.h"
#include "IncExternAI.h"
struct AIClasses;
class CKAIK: public IGlobalAI {
public:
CR_DECLARE(CKAIK)
CKAIK(): ai(NULL) {}
~CKAIK() {}
void InitAI(IGlobalAICallback* callback, int team);
void ReleaseAI();
void UnitCreated(int unit, int builder);
void UnitFinished(int unit);
void UnitDestroyed(int unit, int attacker);
void UnitIdle(int unit);
void UnitDamaged(int damaged, int attacker, float damage, float3 dir);
void EnemyDamaged(int damaged, int attacker, float damage, float3 dir);
void UnitMoveFailed(int unit);
void EnemyEnterLOS(int enemy);
void EnemyLeaveLOS(int enemy);
void EnemyEnterRadar(int enemy);
void EnemyLeaveRadar(int enemy);
void EnemyDestroyed(int enemy, int attacker);
void EnemyCreated(int enemy);
void EnemyFinished(int enemy);
void RecvChatMessage(const char* msg, int player);
void RecvLuaMessage(const char* inData, const char** outData);
int HandleEvent(int msg, const void* data);
void Update();
#ifdef USING_CREG
void Load(IGlobalAICallback* callback, std::istream* ifs);
void Save(std::ostream* ofs);
void PostLoad(void);
void Serialize(creg::ISerializer* s);
#endif
AIClasses* GetAI() const { return ai; }
private:
AIClasses* ai;
};
#endif