Zombies with PathFinding Run and Attack !

This commit is contained in:
Morph01
2024-08-16 19:17:51 +02:00
parent 6160561498
commit 1a14c78ede
4 changed files with 103 additions and 57 deletions

View File

@@ -1,12 +1,14 @@
#pragma once
#include "FirstPersonPlayer.h"
#include <godot_cpp/classes/animation_node_state_machine_playback.hpp>
#include <godot_cpp/classes/animation_tree.hpp>
#include <godot_cpp/classes/character_body3d.hpp>
#include <godot_cpp/classes/navigation_agent3d.hpp>
#include <godot_cpp/variant/node_path.hpp>
#include "FirstPersonPlayer.h"
namespace blitz {
class Zombie : public godot::CharacterBody3D {
GDCLASS(Zombie, godot::CharacterBody3D)
protected:
@@ -18,15 +20,17 @@ class Zombie : public godot::CharacterBody3D {
void _ready();
void _process(float delta);
bool _target_in_range();
private:
godot::NavigationAgent3D* m_NavigationAgent;
FirstPersonPlayer* m_Player;
godot::NodePath m_PlayerPath;
godot::Vector3 m_Velocity;
godot::AnimationTree* m_AnimationTree;
godot::AnimationNodeStateMachinePlayback* m_StateMachine;
void set_m_PlayerPath(const godot::NodePath& path);
godot::NodePath get_m_PlayerPath() const;
};