- 新增 TerminalUIAudio 事件通知与 TerminalUIAudioBehaviour 组件 - TerminalButton/TerminalMenuItemView/SelectItem/SliderItem 接入悬停与点击音效 - AudioManager 监听 TerminalUIEvent 播放 menu_hover/menu_click - 新增 PauseMenu 环境音状态及恢复逻辑 - 新增 MainMenuStage FMOD 参数控制 - BaseButton 调用基类 DoStateTransition 保证状态事件正确触发 - 为 TerminalChapterPanel Prefab 添加 TerminalUIAudioBehaviour
102 lines
1.9 KiB
C#
102 lines
1.9 KiB
C#
using System.Text.RegularExpressions;
|
|
using AibisDream.Kit;
|
|
using AibisDream.Utility;
|
|
using Yarn.Unity;
|
|
|
|
namespace AibisDream
|
|
{
|
|
public enum EventEnum
|
|
{
|
|
NextYarn,
|
|
PlugIn,
|
|
PlugOut,
|
|
SceneLoad,
|
|
FixSceneModeChanged,
|
|
CutEnd
|
|
}
|
|
|
|
public enum GameLoopEnum
|
|
{
|
|
AppStart,
|
|
GameStart,
|
|
GameQuit,
|
|
PauseGame,
|
|
UnPauseGame,
|
|
ScreenResolutionChanged
|
|
}
|
|
|
|
public enum DialogEventEnum
|
|
{
|
|
StartNode,
|
|
|
|
LineStart,
|
|
LineShown,
|
|
LineEnd,
|
|
OptionShow,
|
|
OptionSelected
|
|
}
|
|
|
|
public enum InteractionEventEnum
|
|
{
|
|
DialogStart,
|
|
DialogEnd
|
|
}
|
|
|
|
public enum ScreenEventEnum
|
|
{
|
|
RegisterLineView,
|
|
|
|
Selected
|
|
}
|
|
|
|
public struct DialogText
|
|
{
|
|
public bool isOption;
|
|
public string line;
|
|
public CharacterVo actor;
|
|
public string lineId;
|
|
|
|
public static DialogText GetLine(LocalizedLine dialogueLine)
|
|
{
|
|
return new DialogText
|
|
{
|
|
isOption = false,
|
|
line = dialogueLine.TextWithoutCharacterName.Text,
|
|
lineId = dialogueLine.TextID,
|
|
actor = dialogueLine.GetCharacterVo()
|
|
};
|
|
}
|
|
|
|
public string GetRecordLine()
|
|
{
|
|
const string allowedTagsPattern = @"(<|{)(?!\/?(b|i|color)(?=>|\s|=))[^(>|})]+(>|})";
|
|
var res = Regex.Replace(line, allowedTagsPattern, "");
|
|
return res;
|
|
}
|
|
}
|
|
|
|
public enum StorageEvent
|
|
{
|
|
VariableSet
|
|
}
|
|
|
|
public enum SettingChangeEvent
|
|
{
|
|
TextSpeed,
|
|
LocaleChanged
|
|
}
|
|
|
|
public enum TerminalUIAudioEnum
|
|
{
|
|
Hover,
|
|
Click,
|
|
}
|
|
|
|
public enum TerminalUIEvent
|
|
{
|
|
MainMenuPhase,
|
|
PauseMenuAmbEnter,
|
|
PauseMenuAmbExit,
|
|
}
|
|
}
|