generated from Persson-dev/Godot-Xmake
format
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
#include <godot_cpp/classes/camera3d.hpp>
|
#include <godot_cpp/classes/camera3d.hpp>
|
||||||
#include <godot_cpp/classes/character_body3d.hpp>
|
#include <godot_cpp/classes/character_body3d.hpp>
|
||||||
#include <godot_cpp/classes/node3d.hpp>
|
|
||||||
#include <godot_cpp/classes/input_event_mouse_motion.hpp>
|
#include <godot_cpp/classes/input_event_mouse_motion.hpp>
|
||||||
|
#include <godot_cpp/classes/node3d.hpp>
|
||||||
|
|
||||||
namespace blitz {
|
namespace blitz {
|
||||||
|
|
||||||
@@ -17,20 +17,20 @@ class FirstPersonPlayer : public godot::CharacterBody3D {
|
|||||||
~FirstPersonPlayer();
|
~FirstPersonPlayer();
|
||||||
|
|
||||||
// Godot overrides
|
// Godot overrides
|
||||||
void _unhandled_input(const godot::Ref<godot::InputEvent>&);
|
void _unhandled_input(const godot::Ref<godot::InputEvent>&);
|
||||||
void _physics_process(float delta);
|
void _physics_process(float delta);
|
||||||
void _ready();
|
void _ready();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
godot::Camera3D* m_Camera;
|
godot::Camera3D* m_Camera;
|
||||||
godot::Node3D* m_Head;
|
godot::Node3D* m_Head;
|
||||||
float m_BobTime;
|
float m_BobTime;
|
||||||
float m_Speed;
|
float m_Speed;
|
||||||
|
|
||||||
void UpdateBobbing(float delta);
|
void UpdateBobbing(float delta);
|
||||||
void UpdateFOV(float delta);
|
void UpdateFOV(float delta);
|
||||||
void UpdateCamera(const godot::InputEventMouseMotion&);
|
void UpdateCamera(const godot::InputEventMouseMotion&);
|
||||||
void UpdatePosition(float delta);
|
void UpdatePosition(float delta);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace blitz
|
} // namespace blitz
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
#include "register_types.h"
|
#include "register_types.h"
|
||||||
|
|
||||||
|
#include "FirstPersonPlayer.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "SpringArmPivot.h"
|
#include "SpringArmPivot.h"
|
||||||
#include "FirstPersonPlayer.h"
|
|
||||||
|
|
||||||
#include <gdextension_interface.h>
|
#include <gdextension_interface.h>
|
||||||
#include <godot_cpp/core/defs.hpp>
|
#include <godot_cpp/core/defs.hpp>
|
||||||
@@ -26,9 +26,8 @@ void uninitialize_example_module(ModuleInitializationLevel p_level) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C"
|
extern "C" GDExtensionBool GDE_EXPORT library_init(GDExtensionInterfaceGetProcAddress p_get_proc,
|
||||||
GDExtensionBool GDE_EXPORT library_init(GDExtensionInterfaceGetProcAddress p_get_proc, const GDExtensionClassLibraryPtr p_library,
|
const GDExtensionClassLibraryPtr p_library, GDExtensionInitialization* r_initialization) {
|
||||||
GDExtensionInitialization* r_initialization) {
|
|
||||||
godot::GDExtensionBinding::InitObject init_obj(p_get_proc, p_library, r_initialization);
|
godot::GDExtensionBinding::InitObject init_obj(p_get_proc, p_library, r_initialization);
|
||||||
|
|
||||||
init_obj.register_initializer(initialize_example_module);
|
init_obj.register_initializer(initialize_example_module);
|
||||||
|
|||||||
Reference in New Issue
Block a user