feat: added interactions, demo packs and destructables
This commit is contained in:
parent
d66c999039
commit
5a4ac26c72
12 changed files with 369 additions and 23 deletions
30
modules/wave_survival/player_interactor.h
Normal file
30
modules/wave_survival/player_interactor.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#ifndef PLAYER_INTERACTOR_H
|
||||
#define PLAYER_INTERACTOR_H
|
||||
|
||||
#include "scene/3d/physics/shape_cast_3d.h"
|
||||
class Interactable;
|
||||
|
||||
class PlayerInteractor : public ShapeCast3D {
|
||||
GDCLASS(PlayerInteractor, ShapeCast3D);
|
||||
static void _bind_methods();
|
||||
void highlight_removed();
|
||||
void activate();
|
||||
void ready();
|
||||
void process(double delta);
|
||||
|
||||
protected:
|
||||
void _notification(int what);
|
||||
|
||||
public:
|
||||
virtual PackedStringArray get_configuration_warnings() const override;
|
||||
void pickup_demo_pack();
|
||||
bool try_use_demo_pack();
|
||||
|
||||
private:
|
||||
int num_demo_packs{ 0 };
|
||||
Interactable *interactable{ nullptr };
|
||||
Callable on_highlight_removed{ callable_mp(this, &self_type::highlight_removed) };
|
||||
static String activate_method_name;
|
||||
};
|
||||
|
||||
#endif // !PLAYER_INTERACTOR_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue