# Actor and Player ## 职责 Actor 模块负责游戏对象。当前已实现玩家,敌人、道具、投射物和特效后续按同样方式扩展。 主要源码: - `game/src/actor/player_actor.*` - `game/src/actor/player_animation_assets.*` - `game/src/combat/hitbox.h` ## `PlayerActor` 当前能力: - 左右移动。 - 跳跃。 - 普通攻击触发。 - idle/run/punch 三个临时状态。 - 朝向翻转。 - 基础平台碰撞。 - 跳跃/攻击音效 cue。 ## 动画资源 玩家动画加载顺序: ```text PVF .ani -> NPK IMG -> PNG spritesheet fallback ``` 如果使用 PVF `.ani`,由引擎 `Animation` 播放;如果回退 PNG,当前仍保留少量手写帧切换。 ## 当前限制 - 还没有完整 ACT 状态机。 - 攻击还没有命中判定。 - 受击、击退、血量、硬直未接入。 - PNG fallback 的帧数和帧时长仍在 C++ 中。 ## 下一步 - 把 idle/move/jump/attack/hit/dead 做成互斥状态机。 - 从 `Animation::GetCurrentFrameInfo()` 接入 attack box / damage box。 - 新增 `EnemyActor` 时复用 Actor、PlatformWorld 和动画资源加载链路。