...
parent
d7b1fbc1d1
commit
d3e93435a7
Binary file not shown.
|
|
@ -0,0 +1,19 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://dcj5luvlejqah"
|
||||||
|
path="res://.godot/imported/1768152584558824262-354712429236314.mp3-865b29f44cd466747e89247a493fdcde.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://1768152584558824262-354712429236314.mp3"
|
||||||
|
dest_files=["res://.godot/imported/1768152584558824262-354712429236314.mp3-865b29f44cd466747e89247a493fdcde.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
|
|
@ -5,16 +5,22 @@ enum AgeState { BABY, TEEN }
|
||||||
|
|
||||||
var current_age = AgeState.BABY
|
var current_age = AgeState.BABY
|
||||||
|
|
||||||
# Referenzen zu den anderen Nodes
|
# --- REFERENZEN ---
|
||||||
@export var controller : XRController3D
|
@export var controller : XRController3D
|
||||||
@export var player_body : CharacterBody3D
|
@export var player_body : CharacterBody3D
|
||||||
@export var player : XROrigin3D
|
@export var player : XROrigin3D
|
||||||
@export var world_env : WorldEnvironment
|
@export var world_env : WorldEnvironment
|
||||||
@export var movement_direct : Node
|
@export var movement_direct : Node
|
||||||
|
|
||||||
# NEU: Referenz zur Kamera für den FOV-Effekt
|
|
||||||
@export var camera : Camera3D
|
@export var camera : Camera3D
|
||||||
|
|
||||||
|
# Audio
|
||||||
|
@export var audio_baby : AudioStreamPlayer3D
|
||||||
|
@export var audio_teen : AudioStreamPlayer3D
|
||||||
|
|
||||||
|
# NEU: Die 3D-Modelle für das Tipi/Burg
|
||||||
|
@export var mesh_castle : Node3D
|
||||||
|
@export var mesh_fort : Node3D
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
if not controller:
|
if not controller:
|
||||||
controller = get_parent().get_parent()
|
controller = get_parent().get_parent()
|
||||||
|
|
@ -49,64 +55,85 @@ func change_age(direction: int):
|
||||||
apply_age_physics(true)
|
apply_age_physics(true)
|
||||||
|
|
||||||
func apply_age_physics(animate: bool = true):
|
func apply_age_physics(animate: bool = true):
|
||||||
# Sicherheitscheck erweitert um Camera
|
# Sicherheitscheck (Jetzt auch mit den Meshes)
|
||||||
if not player_body or not world_env or not movement_direct or not camera:
|
if not player_body or not world_env or not movement_direct or not camera or not audio_baby or not audio_teen or not mesh_castle or not mesh_fort:
|
||||||
printerr("FEHLER: Bitte ALLE Nodes (auch Camera) im Inspektor zuweisen!")
|
printerr("FEHLER: Bitte ALLE Nodes (auch Castle/Fort) im Inspektor zuweisen!")
|
||||||
return
|
return
|
||||||
|
|
||||||
# Ziel-Werte definieren
|
# --- ZIELWERTE DEFINIEREN ---
|
||||||
var target_saturation = 1.0
|
var target_saturation = 1.0
|
||||||
var target_height_max = 0.0
|
var target_height_max = 0.0
|
||||||
var target_height_min = 0.0
|
var target_height_min = 0.0
|
||||||
var target_speed = 0.0
|
var target_speed = 0.0
|
||||||
var target_fov = 75.0 # NEU: Variable für FOV
|
var target_fov = 75.0
|
||||||
|
var target_vol_baby = -80.0
|
||||||
|
var target_vol_teen = -80.0
|
||||||
var translation_step = Vector3.ZERO
|
var translation_step = Vector3.ZERO
|
||||||
|
|
||||||
|
# NEU: Sichtbarkeit
|
||||||
|
var show_castle = false
|
||||||
|
var show_fort = false
|
||||||
|
|
||||||
match current_age:
|
match current_age:
|
||||||
AgeState.BABY:
|
AgeState.BABY:
|
||||||
target_saturation = 2.0
|
target_saturation = 2.0
|
||||||
target_height_min = 0.2
|
target_height_min = 0.2
|
||||||
target_height_max = 0.6
|
target_height_max = 0.6
|
||||||
target_speed = 1.0
|
target_speed = 1.0
|
||||||
target_fov = 40.0 # NEU: Enger Blick (Baby Tunnelblick)
|
target_fov = 40.0
|
||||||
|
target_vol_baby = 0.0
|
||||||
|
target_vol_teen = -80.0
|
||||||
translation_step = Vector3(0, 0.05, 0)
|
translation_step = Vector3(0, 0.05, 0)
|
||||||
|
|
||||||
|
# NEU: Baby sieht Castle
|
||||||
|
show_castle = true
|
||||||
|
show_fort = false
|
||||||
|
|
||||||
AgeState.TEEN:
|
AgeState.TEEN:
|
||||||
target_saturation = 0.5
|
target_saturation = 0.5
|
||||||
target_height_min = 0.6
|
target_height_min = 0.6
|
||||||
target_height_max = 2.5
|
target_height_max = 2.5
|
||||||
target_speed = 3.0
|
target_speed = 3.0
|
||||||
target_fov = 75.0 # NEU: Normaler Blick
|
target_fov = 75.0
|
||||||
|
target_vol_baby = -80.0
|
||||||
|
target_vol_teen = 0.0
|
||||||
translation_step = Vector3(0, 0.5, 0)
|
translation_step = Vector3(0, 0.5, 0)
|
||||||
|
|
||||||
# Sofortige Änderungen (Sicherheit)
|
# NEU: Teen sieht Fort
|
||||||
|
show_castle = false
|
||||||
|
show_fort = true
|
||||||
|
|
||||||
|
# --- ANWENDUNG ---
|
||||||
|
|
||||||
|
# 1. Sichtbarkeit sofort umschalten (damit keine Collision Bugs entstehen)
|
||||||
|
mesh_castle.visible = show_castle
|
||||||
|
mesh_fort.visible = show_fort
|
||||||
|
|
||||||
|
# 2. Sofortige Physik-Änderungen
|
||||||
if animate:
|
if animate:
|
||||||
player.translate(translation_step)
|
player.translate(translation_step)
|
||||||
|
|
||||||
player_body.player_height_min = target_height_min
|
player_body.player_height_min = target_height_min
|
||||||
|
|
||||||
|
# 3. Animationen (Tweening)
|
||||||
if animate:
|
if animate:
|
||||||
# --- ANIMATION START ---
|
|
||||||
var tween = create_tween()
|
var tween = create_tween()
|
||||||
tween.set_parallel(true)
|
tween.set_parallel(true)
|
||||||
tween.set_trans(Tween.TRANS_SINE)
|
tween.set_trans(Tween.TRANS_SINE)
|
||||||
tween.set_ease(Tween.EASE_IN_OUT)
|
tween.set_ease(Tween.EASE_IN_OUT)
|
||||||
|
|
||||||
# 1. Environment Sättigung
|
|
||||||
tween.tween_property(world_env.environment, "adjustment_saturation", target_saturation, 1.0)
|
tween.tween_property(world_env.environment, "adjustment_saturation", target_saturation, 1.0)
|
||||||
|
|
||||||
# 2. Körpergröße
|
|
||||||
tween.tween_property(player_body, "player_height_max", target_height_max, 1.0)
|
tween.tween_property(player_body, "player_height_max", target_height_max, 1.0)
|
||||||
|
|
||||||
# 3. Geschwindigkeit
|
|
||||||
tween.tween_property(movement_direct, "max_speed", target_speed, 1.0)
|
tween.tween_property(movement_direct, "max_speed", target_speed, 1.0)
|
||||||
|
|
||||||
# 4. Kamera FOV (NEU)
|
|
||||||
tween.tween_property(camera, "fov", target_fov, 1.0)
|
tween.tween_property(camera, "fov", target_fov, 1.0)
|
||||||
|
tween.tween_property(audio_baby, "volume_db", target_vol_baby, 1.0)
|
||||||
|
tween.tween_property(audio_teen, "volume_db", target_vol_teen, 1.0)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Start-Setup (Hart setzen)
|
# Start-Setup (Hart setzen)
|
||||||
world_env.environment.adjustment_saturation = target_saturation
|
world_env.environment.adjustment_saturation = target_saturation
|
||||||
player_body.player_height_max = target_height_max
|
player_body.player_height_max = target_height_max
|
||||||
movement_direct.max_speed = target_speed
|
movement_direct.max_speed = target_speed
|
||||||
camera.fov = target_fov # NEU
|
camera.fov = target_fov
|
||||||
|
audio_baby.volume_db = target_vol_baby
|
||||||
|
audio_teen.volume_db = target_vol_teen
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,19 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://de8rodemmcmg1"
|
||||||
|
path="res://.godot/imported/How German Sounds To Non-Germans (mp3cut.net).mp3-d26f34ddc74ecd202079ae52a7a86607.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://How German Sounds To Non-Germans (mp3cut.net).mp3"
|
||||||
|
dest_files=["res://.godot/imported/How German Sounds To Non-Germans (mp3cut.net).mp3-d26f34ddc74ecd202079ae52a7a86607.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,19 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://bv2jpkqwo1s1u"
|
||||||
|
path="res://.godot/imported/How German Sounds To Non-Germans (mp3cut.net).mp3-672a46588bbc0bf9076ebaf894a8873d.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/godot-xr-tools/examples/How German Sounds To Non-Germans (mp3cut.net).mp3"
|
||||||
|
dest_files=["res://.godot/imported/How German Sounds To Non-Germans (mp3cut.net).mp3-672a46588bbc0bf9076ebaf894a8873d.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
64
level.tscn
64
level.tscn
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue