---
name: combo_display.aicomponent
description: 连击计数 UI。追踪时间窗口内的连续成功消除次数，显示连击数字和倒计时进度环，超时后重置连击。
triggers: 需要实现连击系统 UI 时触发。
---

# 连击计数 UI（Combo Display UI）

## Scaffold

- `src/game/scenes/GameUI/ComboManager.ts`（连击逻辑）
- `src/game/scenes/GameUI/ComboSmallUI.ts`（小连击 UI 进度环）

## Recipe

| 决策 | 原因 |
|------|------|
| **逻辑与 UI 同 skill** | ComboManager（连击计数+时间窗口）和 ComboSmallUI（进度环动画）高度耦合；拆分没有复用价值，合并为一个 skill 降低管理成本 |
| **时间窗口重置** | 玩家在时间窗口内连续消除才累积连击，超时后连击归零；给玩家明确的视觉反馈（进度环倒计时）提升参与感 |

## Adapter

- **Role**: `comboDisplay` — 连击计数追踪 + 进度环 UI
- **Provides**: `ComboManager` 类（连击计数、时间窗口、触发 `maybeShowComboPraiseText`）、`ComboSmallUI` 类（圆形进度环动画）
- **Requires**: `phaser.aicomponent`（硬依赖）
- **Consumed by**: `game_scene.aicomponent`（持有 ComboManager）、`path_input_handler.aicomponent`（成功消除时调用 `addCombo()`）
- **Integration point**: `src/game/scenes/GameUI/ComboManager.ts` + `ComboSmallUI.ts`

## Imports

- `phaser.aicomponent`（硬依赖）

## Skill Definition

```yaml
tools:
  - read_file
  - write_file
inputs:
  - source: src/game/scenes/GameUI/ComboManager.ts
  - source: src/game/scenes/GameUI/ComboSmallUI.ts
outputs:
  - comboManager: ComboManager class (combo logic + praise text trigger)
  - comboSmallUI: ComboSmallUI class (circular countdown ring)
```
