generated from Persson-dev/Godot-Xmake
refactor player
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user