SusSpeechBubble

世界空间对话气泡(尾巴、可选自动隐藏、SusTextFx 揭示);3D 绑定由外部 WorldSpaceService 完成,气泡本身不做相机投影。
包
SusKit · 世界(商业)
属性
| 名称 | 类型 | 默认值 | |
|---|---|---|---|
Text | Prop<string> | "" | v-model |
SpeakerName | Prop<string> | "" | |
Tail | Prop<string> | "down" | |
MaxWidth | Prop<float> | 240f | |
AutoHideSeconds | Prop<float> | 0f | |
Reveal | Prop<string> | "Instant" | |
CharsPerSecond | Prop<float> | 30f |
插槽
没有插槽。
事件
| 名称 | 字段 | 载荷 |
|---|---|---|
Hidden | OnHidden | — |
样式钩子
USS 类契约 — 无需改 C# 即可覆盖外观。状态通过这些类切换:
sus-speech-bubblesus-speech-bubble__chromesus-speech-bubble__speakersus-speech-bubble__speaker--emptysus-speech-bubble__tailsus-speech-bubble__textsus-speech-bubble--hiddensus-speech-bubble--tail-downsus-speech-bubble--tail-leftsus-speech-bubble--tail-nonesus-speech-bubble--tail-rightsus-speech-bubble--tail-up
用法
与对话相同的 reveal 路径(SusTextFx)。世界跟随是外部的 — 对气泡(或其宿主)调用 WorldSpaceService.BindToWorld;组件本身不做相机投影。
csharp
var bubble = new SusSpeechBubble();
bubble.Tail.Value = "down"; // down | up | left | right | none
bubble.MaxWidth.Value = 240f;
bubble.AutoHideSeconds.Value = 3f; // 0 = stay until Hide()
bubble.Reveal.Value = "PerChar";
bubble.Show("Over here!", "Scout");
// WorldSpaceService.BindToWorld(bubble, unitTransform, offset);
bubble.OnHidden = () => { /* pooled / disposed */ };| Prop / API | 角色 |
|---|---|
Text / SpeakerName | 正文与可选名称标签 |
Tail | USS 尾巴方向类 |
MaxWidth | 软宽度上限 |
AutoHideSeconds | reveal 后隐藏(0 = 手动) |
Reveal / CharsPerSecond | 与 SusDialogueBox 相同模式 |
Show / Hide / OnHidden | 可见性生命周期 |
说明
- Storybook story Speech Bubble (
speech-bubble). - Hub shot
kit-speech-bubble.png— 展示,已从 Play mode 实拍。