feat: added sound events for enemy awareness

This commit is contained in:
Sara 2025-08-04 17:00:23 +02:00
parent 1373656f90
commit 66aede32bd
15 changed files with 234 additions and 16 deletions

View file

@ -0,0 +1,26 @@
#ifndef SOUND_EVENT_NODE_H
#define SOUND_EVENT_NODE_H
#include "scene/3d/node_3d.h"
class SoundEventNode : public Node3D {
GDCLASS(SoundEventNode, Node3D);
static void _bind_methods();
void ready();
protected:
void _notification(int what);
public:
void trigger_event();
void set_trigger_on_ready(bool value);
bool get_trigger_on_ready() const;
void set_range(float value);
float get_range() const;
private:
float range{ 20.f };
bool trigger_on_ready{ true };
};
#endif // !SOUND_EVENT_NODE_H