Compare commits
3 commits
569ac1f712
...
bc646bd1c2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bc646bd1c2 | ||
![]() |
0713a1442d | ||
![]() |
bd5320f7a1 |
7
modules/wave_survival/map_region.cpp
Normal file
7
modules/wave_survival/map_region.cpp
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#include "map_region.h"
|
||||||
|
|
||||||
|
String const MapRegion::sig_phase_changed{ "phase_changed" };
|
||||||
|
|
||||||
|
void MapRegion::_bind_methods() {
|
||||||
|
ADD_SIGNAL(MethodInfo(sig_phase_changed, PropertyInfo(Variant::BOOL, "hunt_phase")));
|
||||||
|
}
|
18
modules/wave_survival/map_region.h
Normal file
18
modules/wave_survival/map_region.h
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#ifndef MAP_REGION_H
|
||||||
|
#define MAP_REGION_H
|
||||||
|
|
||||||
|
#include "scene/3d/physics/area_3d.h"
|
||||||
|
|
||||||
|
class MapRegion : public Area3D {
|
||||||
|
GDCLASS(MapRegion, Area3D);
|
||||||
|
static void _bind_methods();
|
||||||
|
|
||||||
|
private:
|
||||||
|
float awareness{ 0.f };
|
||||||
|
bool hunt_phase{ false };
|
||||||
|
|
||||||
|
public:
|
||||||
|
static String const sig_phase_changed;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // !MAP_REGION_H
|
|
@ -22,6 +22,7 @@
|
||||||
#include "wave_survival/state.h"
|
#include "wave_survival/state.h"
|
||||||
#include "wave_survival/state_machine.h"
|
#include "wave_survival/state_machine.h"
|
||||||
#include "wave_survival/weapon_base.h"
|
#include "wave_survival/weapon_base.h"
|
||||||
|
#include "wave_survival/map_region.h"
|
||||||
#include "wave_survival/weapon_inventory.h"
|
#include "wave_survival/weapon_inventory.h"
|
||||||
#include "wave_survival/weapons/revolver.h"
|
#include "wave_survival/weapons/revolver.h"
|
||||||
#include "wave_survival/weapons/rifle.h"
|
#include "wave_survival/weapons/rifle.h"
|
||||||
|
@ -57,6 +58,7 @@ void initialize_wave_survival_module(ModuleInitializationLevel p_level) {
|
||||||
GDREGISTER_CLASS(SoundEventNode);
|
GDREGISTER_CLASS(SoundEventNode);
|
||||||
GDREGISTER_CLASS(MuzzleEffect);
|
GDREGISTER_CLASS(MuzzleEffect);
|
||||||
GDREGISTER_RUNTIME_CLASS(HeadsUpDisplay);
|
GDREGISTER_RUNTIME_CLASS(HeadsUpDisplay);
|
||||||
|
GDREGISTER_RUNTIME_CLASS(MapRegion);
|
||||||
|
|
||||||
memnew(SoundEventPatchboard);
|
memnew(SoundEventPatchboard);
|
||||||
Engine::get_singleton()->add_singleton(Engine::Singleton(SoundEventPatchboard::get_class_static(), SoundEventPatchboard::get_singleton()));
|
Engine::get_singleton()->add_singleton(Engine::Singleton(SoundEventPatchboard::get_class_static(), SoundEventPatchboard::get_singleton()));
|
||||||
|
|
|
@ -41,7 +41,8 @@ environment = SubResource("Environment_uqqn3")
|
||||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="SubViewportContainer/SubViewport"]
|
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="SubViewportContainer/SubViewport"]
|
||||||
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
|
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
|
||||||
shadow_enabled = true
|
shadow_enabled = true
|
||||||
directional_shadow_max_distance = 500.0
|
shadow_blur = 0.281
|
||||||
|
directional_shadow_max_distance = 112.6
|
||||||
|
|
||||||
[node name="PlayerBody" parent="SubViewportContainer/SubViewport" instance=ExtResource("1_7vohb")]
|
[node name="PlayerBody" parent="SubViewportContainer/SubViewport" instance=ExtResource("1_7vohb")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -20.417719, 1.340589, -8.014704)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -20.417719, 1.340589, -8.014704)
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue