SusGameSessionScreenContent

全出血比赛外壳 — 通过 HUD 预设挂载 SusHudRoot、session chrome(turn/phase/hint/quit)、可选的结果遮罩层。
包
SusGame · 屏幕(商业)
属性
| 名称 | 类型 | 默认值 | |
|---|---|---|---|
TurnNumber | Prop<int> | 1 | |
TurnLabel | Prop<string> | "Turn 1" | |
Phase | Prop<string> | "deployment" | |
PhaseLabel | Prop<string> | "Deployment" | |
IsPlayerTurn | Prop<bool> | true | |
ActiveAction | Prop<string> | "" | |
ShowResult | Prop<bool> | false | |
ResultText | Prop<string> | "" | |
ActionHint | Prop<string> | "" | |
HudPresetId | Prop<string> | SusHudPresetRegistry.Tactical |
插槽
没有插槽。
事件
没有公开事件。
样式钩子
USS 类契约 — 无需改 C# 即可覆盖外观。状态通过这些类切换:
sc-gs-actionbarsc-gs-result-overlaysc-gs-topbarsus-flow-hintsus-flow-hint--flushsus-game-session-action-btnsus-game-session-screensus-game-session-screen__hintsus-game-session-screen__phase-labelsus-game-session-screen__quit-btnsus-game-session-screen__turn-labelsus-menu-button
用法
绑定 chrome props;修改 HudPresetId 或调用 ApplyHudPreset 来切换模块。从宿主为 QuitBtn / ResultOkBtn 接线。
xml
<template>
<sus:SusGameSessionScreenContent
:TurnNumber="Turn.Value"
:TurnLabel="TurnLbl.Value"
:Phase="PhaseId.Value"
:PhaseLabel="PhaseLbl.Value"
:ActionHint="Hint.Value"
:ShowResult="ShowEnd.Value"
:ResultText="Result.Value"
:HudPresetId="Preset.Value"
/>
</template>
<script>
public Prop<int> Turn = new(1);
public Prop<string> TurnLbl = new("Turn 1");
public Prop<string> PhaseId = new("deployment");
public Prop<string> PhaseLbl = new("Deployment");
public Prop<string> Hint = new("");
public Prop<bool> ShowEnd = new(false);
public Prop<string> Result = new("");
public Prop<string> Preset = new(SusHudPresetRegistry.Deployment);
</script>csharp
var session = new SusGameSessionScreenContent();
session.HudPresetId.Value = SusHudPresetRegistry.Tactical;
session.ApplyHudPreset(SusHudPresetRegistry.Tactical);
// After mount — AbilityBar / MinimapFrame / ObjectivePanel from HudMount
session.TurnNumber.Value = 3;
session.PhaseLabel.Value = "Action";
session.ActionHint.Value = "Select a unit";
session.ShowResult.Value = true;
session.ResultText.Value = "Victory";
session.QuitBtn.OnClick += () => { /* confirm quit */ };
session.ResultOkBtn.OnClick += () => { /* dismiss result */ };| Prop / API | Role |
|---|---|
TurnNumber / TurnLabel | 回合芯片(TurnLabel 非空时优先) |
Phase / PhaseLabel | 阶段芯片文本 |
ActionHint | Chrome 提示 alert;为空 → 隐藏 |
ShowResult / ResultText | 结果遮罩层可见性 + 文案 |
HudPresetId | 变化时触发 ApplyHudPreset |
IsPlayerTurn / ActiveAction | 已声明的 Prop<> — 当前 pin 未接入 chrome UI |
HudRoot / HudMount | Root + 最近一次 SusHudAssembler.Apply 的结果 |
AbilityBar / MinimapFrame / ObjectivePanel | 来自挂载点的引用(按预设可能为 null) |
QuitBtn / ResultOkBtn / ActionBar | 宿主接线 |
ApplyHudPreset(id) | 重新应用 assembler + 重建 session chrome |
备注
- 默认预设 =
SusHudPresetRegistry.Deployment。空 id 回退到Tactical。 ApplyHudPreset会在挂载的面板上填充演示用目标(Deploy units/Complete the mission)— 正式任务请从宿主替换。- Session chrome 期望预设提供
session-chrome自定义宿主;否则挂载到TL。