Reorganize the codebase into role-based folders (snake_case)
Move the 40-odd root-level scripts and scenes into a tree that groups by role,
per the approved roadmap (WS2/WS3): actors/{player,matador,bear}, systems/{combat,
fx,input,debug,render,crowd,config}, ui/, props/ (was tscn_s/). Rename the shell
scene.tscn -> levels/game_shell.tscn and every PascalCase scene to snake_case
(Player.tscn -> player.tscn, MainMenu.tscn -> main_menu.tscn, etc.) so the
case-insensitive web/macOS filesystems can't alias two files together.
Done as a scripted move: each file travels with its .uid; every quoted res:// path
across scenes, scripts, .tres, and project.godot's 9 autoloads is rewritten; the
.godot uid/class cache is rebuilt from scratch. Scenes still resolve by uid, so the
rewrite is belt-and-suspenders. Lint globs (run_tests.sh + both CI workflows) now
walk the new dirs; an orphan animation_tree.gd.uid and 7 pre-existing trailing-
whitespace lints (barrel/torch, never covered by the old root-only glob) are cleaned.
Full suite green on both sides. Asset consolidation (Assets/Animations/fonts ->
art/) is deferred — moving imported .glb/.png/.ttf is safer done in the editor.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017KoYBYQgRyY1zDHXMsXY3V
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
extends Node3D
|
||||
|
||||
func _ready() -> void:
|
||||
# 1. Set up the collision layers for the debris pieces
|
||||
for child in get_children():
|
||||
if child is RigidBody3D:
|
||||
child.collision_layer = 2
|
||||
|
||||
# 2. Wait 4 seconds while the pieces settle on the ground
|
||||
await get_tree().create_timer(5.0).timeout
|
||||
|
||||
# 3. Create a smooth 1-second fade out before deleting
|
||||
var tween = create_tween().set_parallel(true)
|
||||
|
||||
for child in get_children():
|
||||
if child is RigidBody3D:
|
||||
for sub_child in child.get_children():
|
||||
if sub_child is MeshInstance3D || sub_child.get_class() == "ImporterMeshInstance3D":
|
||||
|
||||
# Inside your tween loop:
|
||||
# Shrinks the physical fragments to nothing over 1 second
|
||||
tween.tween_property(child, "scale", Vector3.ZERO, 0.3)
|
||||
|
||||
# 4. Delete the scene once the fade finishes
|
||||
await get_tree().create_timer(0.29).timeout
|
||||
queue_free()
|
||||
Reference in New Issue
Block a user