2022-10-10 21:54:12 -03:00
|
|
|
#include "CameraLimit.h"
|
2022-08-27 18:10:36 -04:00
|
|
|
#include "Event.h"
|
2022-04-05 14:51:59 -04:00
|
|
|
#include "Main.h"
|
2022-06-11 00:26:11 -04:00
|
|
|
#include "coin/CoinCollected.h"
|
2022-07-16 18:36:38 -04:00
|
|
|
#include "coin/CoinCounter.h"
|
2022-10-10 21:54:12 -03:00
|
|
|
#include "coin/CoinNotCollected.h"
|
2022-07-17 21:51:11 -04:00
|
|
|
#include "goal/GoalNotReached.h"
|
2022-10-10 21:54:12 -03:00
|
|
|
#include "goal/GoalReached.h"
|
2022-08-27 22:34:18 -04:00
|
|
|
#include "gui/game_over/GameOverScreen.h"
|
2022-08-31 01:07:56 -04:00
|
|
|
#include "gui/game_won/GameWonScreen.h"
|
2023-02-26 21:45:25 -03:00
|
|
|
#include "player/AI.h"
|
2022-10-10 21:54:12 -03:00
|
|
|
#include "player/Player.h"
|
|
|
|
#include "player/states/PlayerFall.h"
|
|
|
|
#include "player/states/PlayerIdle.h"
|
|
|
|
#include "player/states/PlayerJump.h"
|
|
|
|
#include "player/states/PlayerMove.h"
|
|
|
|
#include "state_machine/State.h"
|
|
|
|
#include "state_machine/StateMachine.h"
|
|
|
|
|
|
|
|
#include <Godot.hpp>
|
2022-04-05 14:51:59 -04:00
|
|
|
|
2022-04-13 00:59:23 -04:00
|
|
|
/**
|
|
|
|
* @brief This function connects the gdnative init function.
|
2023-02-26 21:45:25 -03:00
|
|
|
*
|
2022-04-13 00:59:23 -04:00
|
|
|
*/
|
2022-04-05 14:51:59 -04:00
|
|
|
extern "C" void GDN_EXPORT godot_gdnative_init(godot_gdnative_init_options *o)
|
|
|
|
{
|
2022-08-26 19:27:57 -04:00
|
|
|
godot::Godot::gdnative_init(o);
|
2022-04-05 14:51:59 -04:00
|
|
|
}
|
|
|
|
|
2022-04-13 00:59:23 -04:00
|
|
|
/**
|
|
|
|
* @brief This function connects the gdnative terminate function.
|
2023-02-26 21:45:25 -03:00
|
|
|
*
|
2022-04-13 00:59:23 -04:00
|
|
|
*/
|
2022-04-05 14:51:59 -04:00
|
|
|
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
|
2022-08-26 19:27:57 -04:00
|
|
|
godot::Godot::nativescript_terminate(godot::_RegisterState::nativescript_handle);
|
|
|
|
godot::Godot::gdnative_terminate(o);
|
2022-04-05 14:51:59 -04:00
|
|
|
}
|
|
|
|
|
2022-04-13 00:59:23 -04:00
|
|
|
/**
|
|
|
|
* @brief This function connects the init methods in the classes to godot's gdnative.
|
2023-02-26 21:45:25 -03:00
|
|
|
*
|
2022-04-13 00:59:23 -04:00
|
|
|
*/
|
2022-04-05 14:51:59 -04:00
|
|
|
extern "C" void GDN_EXPORT godot_nativescript_init(void *handle)
|
|
|
|
{
|
2022-08-26 19:27:57 -04:00
|
|
|
godot::Godot::nativescript_init(handle);
|
|
|
|
|
2022-10-10 21:54:12 -03:00
|
|
|
godot::register_class<alai::Event>();
|
2022-08-26 19:27:57 -04:00
|
|
|
godot::register_class<alai::StateMachine>();
|
|
|
|
godot::register_class<alai::State>();
|
2022-08-26 21:02:40 -04:00
|
|
|
godot::register_class<alai::Main>();
|
2022-08-26 19:27:57 -04:00
|
|
|
godot::register_class<alai::CameraLimit>();
|
|
|
|
godot::register_class<alai::player::Player>();
|
2023-02-26 21:45:25 -03:00
|
|
|
godot::register_class<alai::player::AI>();
|
2022-08-26 19:27:57 -04:00
|
|
|
godot::register_class<alai::player::PlayerIdle>();
|
|
|
|
godot::register_class<alai::player::PlayerMove>();
|
|
|
|
godot::register_class<alai::player::PlayerJump>();
|
|
|
|
godot::register_class<alai::player::PlayerFall>();
|
2022-08-28 01:08:04 -04:00
|
|
|
godot::register_class<alai::CoinNotCollected>();
|
|
|
|
godot::register_class<alai::CoinCollected>();
|
|
|
|
godot::register_class<alai::CoinCounter>();
|
|
|
|
godot::register_class<alai::GoalReached>();
|
|
|
|
godot::register_class<alai::GoalNotReached>();
|
|
|
|
godot::register_class<alai::GameOverScreen>();
|
2022-08-31 01:07:56 -04:00
|
|
|
godot::register_class<alai::GameWonScreen>();
|
2022-04-05 14:51:59 -04:00
|
|
|
}
|