-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathevent_dispatcher.h
48 lines (35 loc) · 1.1 KB
/
event_dispatcher.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
#include <string>
#include <Python.h>
#include <BWAPI.h>
//#include "helper.h"
class EventDispatcher
{
public:
EventDispatcher();
~EventDispatcher();
void dispatchEvent(BWAPI::Event* e);
void onMatchStart();
void onMatchEnd(bool isWinner);
void onMatchFrame();
void onMenuFrame();
void onSendText(std::string text);
void onReceiveText(BWAPI::Player* player, std::string text);
void onPlayerLeft(BWAPI::Player* player);
void onNukeDetect(BWAPI::Position target);
void onUnitDiscover(BWAPI::Unit* unit);
void onUnitEvade(BWAPI::Unit* unit);
void onUnitShow(BWAPI::Unit* unit);
void onUnitHide(BWAPI::Unit* unit);
void onUnitCreate(BWAPI::Unit* unit);
void onUnitDestroy(BWAPI::Unit* unit);
void onUnitMorph(BWAPI::Unit* unit);
void onUnitRenegade(BWAPI::Unit* unit);
void onUnitComplete(BWAPI::Unit* unit);
void onSaveGame(std::string gameName);
void onConnect(BWAPI::Game* game);
void onDisconnect();
void reload();
private:
PyObject* event_handler;
void LoadEventHandler(bool call_reload = false);
};