feat: added sound events for enemy awareness
This commit is contained in:
parent
1373656f90
commit
66aede32bd
15 changed files with 234 additions and 16 deletions
26
modules/wave_survival/sound_event_node.h
Normal file
26
modules/wave_survival/sound_event_node.h
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue