a4d18e4928
The bull's kick/dash/slam/roll and movement particles were ~112 lines of hand-built CPUParticles3D in player.gd, bypassing the Fx system entirely (Fx.spawn had zero callers) — so Siim couldn't author them in the inspector. - Add six inspector-editable effect scenes (bull_slam/kick/dash one-shots + bull_hoof_dust/charge_trail/roll_sparks continuous); wire player.gd to Fx.spawn() / new Fx.attach(); register them + the gallery + smoke test. - Extract the coded, non-particle slam rings + kick flash into a new bull_impact_fx.gd component (bull_legs.gd pattern). - Drop 12 now-obsolete DP dust look-params (the .tscn owns the look now). - Trim god-file comment noise: rewrite an AI-placeholder barrel block to typed code, drop dead commented-out bounce/topple code, fix stale post-reorg file paths (Assets/… → art/…, PascalCase scene names → snake_case). - Document the Siim workflow in systems/fx/README.md; update CLAUDE.md. player.gd 1307 → 944 lines. Full suite green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CCyaJPTHCH9EDthpf4A5Sj
34 lines
1.2 KiB
GDScript
34 lines
1.2 KiB
GDScript
extends Node3D
|
|
## Live preview stage for the FX library. Cycles through every registered effect on a loop against
|
|
## arena-ish lighting so Siim sees each one as it reads in-game. Open fx/effect_gallery.tscn and
|
|
## press Play, then edit any effect .tscn in the inspector and re-run to compare. See fx/README.md.
|
|
|
|
const _CYCLE_SEC := 1.6
|
|
const _EFFECTS: Array[StringName] = [
|
|
&"blood_burst", &"slam_dust", &"spark", &"hit_flash",
|
|
&"bull_slam", &"bull_kick", &"bull_dash",
|
|
]
|
|
|
|
@onready var _label: Label = $UI/Label
|
|
# Reached by path rather than the Fx global so the placeholder-seeder can compile and attach this
|
|
# script headless (autoload globals aren't resolvable during an on-demand compile in a --script run).
|
|
@onready var _fx: Node = get_node("/root/Fx")
|
|
|
|
var _index := 0
|
|
|
|
|
|
func _ready() -> void:
|
|
var timer := Timer.new()
|
|
timer.wait_time = _CYCLE_SEC
|
|
timer.autostart = true
|
|
add_child(timer)
|
|
timer.timeout.connect(_fire_next)
|
|
_fire_next()
|
|
|
|
|
|
func _fire_next() -> void:
|
|
var effect := _EFFECTS[_index % _EFFECTS.size()]
|
|
_index += 1
|
|
_label.text = "%s (%d/%d)" % [effect, (_index - 1) % _EFFECTS.size() + 1, _EFFECTS.size()]
|
|
_fx.call("spawn", effect, global_transform.translated_local(Vector3(0.0, 0.25, 0.0)))
|