refactor player

This commit is contained in:
2024-08-27 15:29:45 +02:00
parent 0d72e7f765
commit 3c6a3dba44
7 changed files with 80 additions and 93 deletions

View File

@@ -1,17 +1,18 @@
#pragma once
#include <blitz/common/Types.h>
#include <godot_cpp/classes/animation_tree.hpp>
#include <godot_cpp/classes/character_body3d.hpp>
#include <godot_cpp/classes/node3d.hpp>
#include <blitz/common/Types.h>
namespace blitz {
class World;
class PlayerController;
class Player : public godot::Node {
class Player : public godot::CharacterBody3D {
GDCLASS(Player, godot::Node);
GDCLASS(Player, godot::CharacterBody3D);
protected:
static void _bind_methods();
@@ -39,9 +40,7 @@ class Player : public godot::Node {
protected:
godot::Node3D* m_Mesh;
godot::Node3D* m_Head;
godot::AnimationTree* m_AnimationTree;
godot::CharacterBody3D* m_Player;
godot::Vector3 m_SnapVector;
PeerID m_PeerId;
@@ -51,5 +50,6 @@ class Player : public godot::Node {
void BlendAnimation(const godot::String& a_AnimationName, float a_Goal, float a_Delta);
friend class World;
friend class PlayerController;
};
} // namespace blitz