Files
windroost/data
wushenghua a0c590deec feat: add animated units, real touch input and the runtime economy loop
Continues the MVP work from the UI and numbers baseline.

Animation. The frame runs were already in the repository but had never been
packed for runtime use. pack_animation_strip.py now derives one shared scale
and one shared foot line from the union of every frame in a state, so the
character does not jitter between frames; H01 idle/attack, EG01 idle/hit and
B01 idle/hit are packed as transparent fixed-grid atlases. UnitView plays
them with the node origin on the foot line, loops idle, plays hit once and
falls back, and flashes on damage. Content-to-art bindings live in the
content fixture, so no character id is hardcoded in the HUD.

Touch. The previous HUD used gui_input callbacks, which is not proof of a
mobile input path. run_touch_test.sh now feeds InputEventScreenTouch through
Input.parse_input_event and checks that taps on the tap toggle, an enemy card
and the storm button produce the right events on the right tick. It also
caught a real bug: Godot emulates mouse presses from touches, so one tap was
firing both handlers; enemy taps are now debounced.

Economy. The paper model had the reward and upgrade curves but the runtime
only subtracted gold from a balance that was always zero. The scene now owns
permanent progress: victory grants the reward from the shared rules, upgrades
cost a growing amount, hero DPS rises per level, and the next battle is
created with the upgraded roster DPS. run_economy_loop_test.sh proves four
N01 clears pay for the first upgrade and that duplicate grants and losses
behave correctly. The economy pacing was left at four wins rather than
weakening it to satisfy the test.

tools/run_p2_checks.sh now runs 11 gates; all pass. PRODUCTION/38 records
P2-IMP-02/03 and P2-BAT-02 as PASS. Remaining P2 holds: profiler/visual
limit, shield-break and ultimate VFX, real-device safe area and performance.
2026-11-16 23:30:49 +08:00
..