Compare commits

...

3 commits

Author SHA1 Message Date
Sara bc646bd1c2 feat: regenerated some geometry from csg nodes 2025-08-14 11:51:39 +02:00
Sara 0713a1442d tweak: lighting settings 2025-08-14 11:51:29 +02:00
Sara bd5320f7a1 feat: defined map region 2025-08-14 11:51:22 +02:00
5 changed files with 43 additions and 15 deletions

View 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")));
}

View 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

View file

@ -22,6 +22,7 @@
#include "wave_survival/state.h"
#include "wave_survival/state_machine.h"
#include "wave_survival/weapon_base.h"
#include "wave_survival/map_region.h"
#include "wave_survival/weapon_inventory.h"
#include "wave_survival/weapons/revolver.h"
#include "wave_survival/weapons/rifle.h"
@ -57,6 +58,7 @@ void initialize_wave_survival_module(ModuleInitializationLevel p_level) {
GDREGISTER_CLASS(SoundEventNode);
GDREGISTER_CLASS(MuzzleEffect);
GDREGISTER_RUNTIME_CLASS(HeadsUpDisplay);
GDREGISTER_RUNTIME_CLASS(MapRegion);
memnew(SoundEventPatchboard);
Engine::get_singleton()->add_singleton(Engine::Singleton(SoundEventPatchboard::get_class_static(), SoundEventPatchboard::get_singleton()));

View file

@ -41,7 +41,8 @@ environment = SubResource("Environment_uqqn3")
[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)
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")]
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