2022-04-05 14:51:59 -04:00
|
|
|
#include <Godot.hpp>
|
|
|
|
|
2022-04-09 22:16:27 -04:00
|
|
|
#include "StateMachine.h"
|
|
|
|
#include "State.h"
|
|
|
|
#include "Walk.h"
|
|
|
|
#include "Run.h"
|
2022-04-05 14:51:59 -04:00
|
|
|
#include "Main.h"
|
|
|
|
#include "Player.h"
|
2022-04-09 22:16:27 -04:00
|
|
|
#include "PlayerIdle.h"
|
2022-04-05 14:51:59 -04:00
|
|
|
|
|
|
|
using namespace godot;
|
|
|
|
|
|
|
|
extern "C" void GDN_EXPORT godot_gdnative_init(godot_gdnative_init_options *o)
|
|
|
|
{
|
|
|
|
Godot::gdnative_init(o);
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void GDN_EXPORT godot_gdnative_terminate(godot_gdnative_terminate_options *o)
|
|
|
|
{
|
|
|
|
// This next line is a workaround to fix bug:
|
|
|
|
// https://github.com/godotengine/godot/issues/48295
|
|
|
|
Godot::nativescript_terminate(_RegisterState::nativescript_handle);
|
|
|
|
Godot::gdnative_terminate(o);
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void GDN_EXPORT godot_nativescript_init(void *handle)
|
|
|
|
{
|
|
|
|
Godot::nativescript_init(handle);
|
2022-04-09 22:16:27 -04:00
|
|
|
register_class<StateMachine>();
|
|
|
|
register_class<State>();
|
|
|
|
register_class<Walk>();
|
|
|
|
register_class<Run>();
|
2022-04-05 14:51:59 -04:00
|
|
|
register_class<Main>();
|
|
|
|
register_class<Player>();
|
2022-04-09 22:16:27 -04:00
|
|
|
register_class<PlayerIdle>();
|
2022-04-05 14:51:59 -04:00
|
|
|
}
|