GodotHook/hook.h

29 lines
597 B
C++

/* hook.h */
#ifndef HOOK_H
#define HOOK_H
#include "core/object/ref_counted.h"
#include "core/string/ustring.h"
#include "core/variant/variant.h"
#include "core/variant/callable.h"
#include "core/variant/array.h"
#include "core/variant/dictionary.h"
class Hook : public RefCounted {
GDCLASS(Hook, RefCounted);
Dictionary table;
protected:
static void _bind_methods();
public:
Dictionary getTable();
void add(String event, String uid, Callable function);
void call(String event, Array args, bool defer);
void remove(String event, String uid);
Hook();
};
#endif // HOOK_H