generated from Persson-dev/Godot-Xmake
move files into client folder
This commit is contained in:
36
include/client/FirstPersonPlayer.h
Normal file
36
include/client/FirstPersonPlayer.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include <client/Player.h>
|
||||
#include <godot_cpp/classes/input_event_mouse_motion.hpp>
|
||||
|
||||
namespace blitz {
|
||||
|
||||
class FirstPersonPlayer : public Player {
|
||||
GDCLASS(FirstPersonPlayer, godot::CharacterBody3D)
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
FirstPersonPlayer();
|
||||
~FirstPersonPlayer();
|
||||
|
||||
// Godot overrides
|
||||
void _unhandled_input(const godot::Ref<godot::InputEvent>&);
|
||||
void _physics_process(float delta);
|
||||
void _ready() override;
|
||||
|
||||
private:
|
||||
godot::Camera3D* m_Camera;
|
||||
godot::Node3D* m_Head;
|
||||
float m_BobTime;
|
||||
float m_Speed;
|
||||
|
||||
void UpdateBobbing(float delta);
|
||||
void UpdateFOV(float delta);
|
||||
void UpdateCamera(const godot::InputEventMouseMotion&);
|
||||
void UpdatePosition(float delta);
|
||||
|
||||
void UpdateAnimation(float delta);
|
||||
};
|
||||
|
||||
} // namespace blitz
|
||||
Reference in New Issue
Block a user