-----------.
parent
6fb21ea18b
commit
ae352e59fc
|
|
@ -0,0 +1,42 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://byroxl3ej812v"
|
||||
path.s3tc="res://.godot/imported/111.png-078cc29632b379aae0b9ba58c9bae9ec.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/111.png-078cc29632b379aae0b9ba58c9bae9ec.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://111.png"
|
||||
dest_files=["res://.godot/imported/111.png-078cc29632b379aae0b9ba58c9bae9ec.s3tc.ctex", "res://.godot/imported/111.png-078cc29632b379aae0b9ba58c9bae9ec.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c0bfv7taawf0l"
|
||||
path.s3tc="res://.godot/imported/222.png-c1ac6fd16d04ac71537cc789befe63be.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/222.png-c1ac6fd16d04ac71537cc789befe63be.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://222.png"
|
||||
dest_files=["res://.godot/imported/222.png-c1ac6fd16d04ac71537cc789befe63be.s3tc.ctex", "res://.godot/imported/222.png-c1ac6fd16d04ac71537cc789befe63be.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
|
|
@ -22,8 +22,8 @@ var current_age = AgeState.BABY
|
|||
@export var audio_teen : AudioStreamPlayer3D
|
||||
|
||||
# 4. Tipi / Burg Meshes
|
||||
@export var mesh_castle : Node3D
|
||||
@export var mesh_fort : Node3D
|
||||
@export var castle : Node3D
|
||||
@export var fort : Node3D
|
||||
|
||||
# 5. Interaktive Objekte
|
||||
@export var heavy_object : RigidBody3D # Das Regal
|
||||
|
|
@ -69,7 +69,7 @@ func change_age(direction: int):
|
|||
|
||||
func apply_age_physics(animate: bool = true):
|
||||
# Sicherheitscheck: Sind alle Nodes zugewiesen?
|
||||
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 or not heavy_object or not age_paper:
|
||||
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 castle or not fort or not heavy_object or not age_paper:
|
||||
printerr("FEHLER: Bitte ALLE Referenzen (auch Age Paper!) im Inspektor der Uhr zuweisen!")
|
||||
return
|
||||
|
||||
|
|
@ -139,8 +139,17 @@ func apply_age_physics(animate: bool = true):
|
|||
# --- ANWENDUNG ---
|
||||
|
||||
# 1. Sofortige Schaltungen (Visuelles & Physik Logik)
|
||||
mesh_castle.visible = show_castle
|
||||
mesh_fort.visible = show_fort
|
||||
castle.visible = show_castle
|
||||
castle.get_child(0).disabled = not show_castle
|
||||
castle.get_child(1).disabled = not show_castle
|
||||
castle.get_child(2).disabled = not show_castle
|
||||
castle.get_child(3).disabled = not show_castle
|
||||
castle.get_child(4).disabled = not show_castle
|
||||
castle.get_child(5).disabled = not show_castle
|
||||
fort.visible = show_fort
|
||||
fort.get_child(0).disabled = not show_fort
|
||||
fort.get_child(1).disabled = not show_fort
|
||||
fort.get_child(2).disabled = not show_fort
|
||||
|
||||
# Regal update
|
||||
if heavy_object.has_method("set_movable"):
|
||||
|
|
|
|||
|
|
@ -7,24 +7,11 @@ extends Node3D
|
|||
@export var texture_baby : Texture2D # Gekritzel
|
||||
@export var texture_teen : Texture2D # Klartext
|
||||
|
||||
func _ready():
|
||||
# Wir stellen sicher, dass das Material einzigartig ist,
|
||||
# damit wir nicht versehentlich alle Papiere in der Welt ändern.
|
||||
if mesh_instance.material_override:
|
||||
mesh_instance.material_override = mesh_instance.material_override.duplicate()
|
||||
elif mesh_instance.mesh and mesh_instance.mesh.material:
|
||||
mesh_instance.mesh.material = mesh_instance.mesh.material.duplicate()
|
||||
|
||||
func update_texture(is_teen: bool):
|
||||
# Wir holen uns das aktuelle Material
|
||||
var mat = null
|
||||
if mesh_instance.material_override:
|
||||
mat = mesh_instance.material_override
|
||||
else:
|
||||
mat = mesh_instance.mesh.material
|
||||
|
||||
if mat is StandardMaterial3D:
|
||||
var mat = mesh_instance.get_surface_override_material(0)
|
||||
if is_teen:
|
||||
mat.albedo_texture = texture_teen
|
||||
else:
|
||||
mat.albedo_texture = texture_baby
|
||||
mesh_instance.set_surface_override_material(0, mat)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://d1bmffs5q85hn"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://d1bmffs5q85hn"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c8l60rnugru40" path="res://addons/godot-xr-tools/objects/pickable.tscn" id="1_ngymr"]
|
||||
[ext_resource type="Script" uid="uid://ckfh21xv64xk8" path="res://addons/godot-xr-tools/objects/AgePaper.gd" id="2_856bp"]
|
||||
[ext_resource type="Texture2D" uid="uid://byroxl3ej812v" path="res://111.png" id="2_jxdx2"]
|
||||
[ext_resource type="Texture2D" uid="uid://bdnh5ako4yfpr" path="res://assets/tippi/gekritzel.png" id="3_e14vg"]
|
||||
[ext_resource type="Texture2D" uid="uid://dstv63bc0f6tp" path="res://assets/tippi/passwort.png" id="4_jxdx2"]
|
||||
|
||||
|
|
@ -15,7 +16,7 @@ material = SubResource("StandardMaterial3D_e14vg")
|
|||
size = Vector3(0.42, 0.58, 0.02)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_rarql"]
|
||||
albedo_texture = ExtResource("4_jxdx2")
|
||||
albedo_texture = ExtResource("2_jxdx2")
|
||||
|
||||
[node name="Paper" instance=ExtResource("1_ngymr")]
|
||||
|
||||
|
|
|
|||
414
level.tscn
414
level.tscn
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue