---
name: game_over_panel.aicomponent
description: 游戏结束结果面板。半透明遮罩 + 胜利/失败图片 + 下载 CTA 按钮，在关卡胜利或失败后展示，是试玩广告转化的关键界面。
triggers: 需要实现游戏结束结果展示面板时触发。
---

# 游戏结束面板（Game Over Result Panel）

**结算全屏结构、安全区与 CTA 锚点** 见 `playable_end_screen_layout.aicomponent`；底层缩放见 `responsive_2d_layout.aicomponent` 第一节。

## Scaffold

`src/game/scenes/GameUI/GameOverPanel.ts`

## Recipe

| 决策 | 原因 |
|------|------|
| **胜败面板独立于关卡逻辑** | 结果面板是视觉表现层；与 LevelLifecycle（状态机）分离后，不同 Remix 变体可用不同视觉风格的面板，而不改任何游戏逻辑 |
| **软槽位 win/lose Panel** | 胜败图片是典型的 AI 生成资产，每个 Remix 变体可以有不同画风；软槽位允许通过资产替换实现视觉差异化 |
| **遵从结算屏布局规范** | 面板布局（遮罩→主视觉→CTA 位置）遵从 `playable_end_screen_layout.aicomponent` 约定，保证转化率关键的 CTA 位置在安全区内 |

## Adapter

- **Role**: `gameOverDialog` — 胜利/失败结果面板（遮罩 + 结果图 + 下载 CTA 按钮）
- **Provides**: `GameOverPanel` 类（`showWin()`、`showLose()`）
- **Requires**: `phaser.aicomponent`、`tencent_playable_sdk.aicomponent`（sdk.install()）；软槽位：`winPanel`、`losePanel`
- **Consumed by**: `level_lifecycle.aicomponent`（关卡胜利/失败时调用 `showWin()`/`showLose()`）
- **Integration point**: `src/game/scenes/GameUI/GameOverPanel.ts` → LevelLifecycle 内部实例化和触发

## Imports

- `phaser.aicomponent` / `tencent_playable_sdk.aicomponent`（硬依赖）
- `winPanel`（软槽位：胜利面板图片，可替换）
- `losePanel`（软槽位：失败面板图片，可替换）

## Skill Definition

```yaml
tools:
  - read_file
  - write_file
inputs:
  - source: src/game/scenes/GameUI/GameOverPanel.ts
outputs:
  - gameOverPanel: GameOverPanel class (win/lose result modal)
```
