Initial commit

This commit is contained in:
2022-05-14 05:39:04 +03:00
parent 911cd75586
commit f1651856a8
7 changed files with 120 additions and 0 deletions

29
hook.h Normal file
View File

@ -0,0 +1,29 @@
/* hook.h */
#ifndef HOOK_H
#define HOOK_H
#include "core/reference.h"
#include "core/func_ref.h"
#include "core/ustring.h"
#include "core/dictionary.h"
#include "core/array.h"
class Hook : public Reference {
GDCLASS(Hook, Reference);
Dictionary table;
protected:
static void _bind_methods();
public:
Dictionary GetTable();
void Create(String name);
void Add(String event, String uid, Ref<FuncRef> function);
void Call(String event, Array args);
void Remove(String event, String uid);
Hook();
};
#endif // HOOK_H