Merge branch 'bugfix/屏幕文本逻辑' into 'develop'
问题修复 See merge request aibis-dream/aibis-dream!594
This commit is contained in:
@@ -2457,9 +2457,9 @@ RectTransform:
|
||||
- {fileID: 1605070474}
|
||||
m_Father: {fileID: 1180038149}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 120, y: -40}
|
||||
m_SizeDelta: {x: 240, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &133033014
|
||||
@@ -3320,10 +3320,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1696845842}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 200, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 80}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 200, y: -250}
|
||||
m_SizeDelta: {x: 119.47, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &190932926
|
||||
MonoBehaviour:
|
||||
@@ -4472,10 +4472,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1696845842}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 200, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 80}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 200, y: -50}
|
||||
m_SizeDelta: {x: 179.2, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &237392156
|
||||
MonoBehaviour:
|
||||
@@ -4757,9 +4757,9 @@ RectTransform:
|
||||
- {fileID: 1117690820}
|
||||
m_Father: {fileID: 1180038149}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 120, y: -262.6667}
|
||||
m_SizeDelta: {x: 240, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &246580519
|
||||
@@ -6499,7 +6499,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 1, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 540}
|
||||
m_SizeDelta: {x: 0, y: 150}
|
||||
m_SizeDelta: {x: 312, y: 150}
|
||||
m_Pivot: {x: 1, y: 1}
|
||||
--- !u!114 &367483173
|
||||
MonoBehaviour:
|
||||
@@ -10885,9 +10885,9 @@ RectTransform:
|
||||
- {fileID: 576009914}
|
||||
m_Father: {fileID: 367483172}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 188, y: -25}
|
||||
m_SizeDelta: {x: 64, y: 100}
|
||||
m_Pivot: {x: 1, y: 1}
|
||||
--- !u!222 &640896811
|
||||
@@ -11877,9 +11877,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1992739114}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 150, y: -40}
|
||||
m_SizeDelta: {x: 300, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &701853571
|
||||
@@ -14652,6 +14652,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
demoTimer: {fileID: 398371926}
|
||||
loading: {fileID: 0}
|
||||
variableBar: {fileID: 1986521826}
|
||||
--- !u!1 &927888433
|
||||
GameObject:
|
||||
@@ -17291,9 +17292,9 @@ RectTransform:
|
||||
- {fileID: 527148464}
|
||||
m_Father: {fileID: 367483172}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 94, y: -25}
|
||||
m_SizeDelta: {x: 64, y: 100}
|
||||
m_Pivot: {x: 1, y: 1}
|
||||
--- !u!222 &1164645868
|
||||
@@ -18020,7 +18021,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1216017968
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -20113,9 +20114,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1992739114}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 452.3, y: -40}
|
||||
m_SizeDelta: {x: 300, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1377923145
|
||||
@@ -20336,9 +20337,9 @@ RectTransform:
|
||||
- {fileID: 875421811}
|
||||
m_Father: {fileID: 1180038149}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 120, y: -151.33334}
|
||||
m_SizeDelta: {x: 240, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1380796560
|
||||
@@ -23415,10 +23416,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1696845842}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 200, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 80}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 200, y: -350}
|
||||
m_SizeDelta: {x: 119.47, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1611684201
|
||||
MonoBehaviour:
|
||||
@@ -26086,9 +26087,9 @@ RectTransform:
|
||||
- {fileID: 1970860741}
|
||||
m_Father: {fileID: 367483172}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 282, y: -25}
|
||||
m_SizeDelta: {x: 64, y: 100}
|
||||
m_Pivot: {x: 1, y: 1}
|
||||
--- !u!222 &1928871882
|
||||
@@ -26648,10 +26649,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1696845842}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 200, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 80}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 200, y: -150}
|
||||
m_SizeDelta: {x: 238.93, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1960600463
|
||||
MonoBehaviour:
|
||||
@@ -29750,7 +29751,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &2135943277
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -94,9 +94,8 @@ namespace AibisDream.FixSystem
|
||||
// 显示标题
|
||||
ShowTitle(token.lineInfo.character.GetActorName());
|
||||
// 显示文本
|
||||
TypewriterCore textItemTypewriter = AddText(token.lineInfo.lineText);
|
||||
textItemTypewriter.SetTypewriterSpeed(GetTextSpeedValue());
|
||||
textItemTypewriter.onTextShowed.AddListener(() => OnTextShown(token, textItemTypewriter));
|
||||
TypewriterCore textItemTypewriter = AddText(token);
|
||||
|
||||
token.TextStart();
|
||||
// 强制更新布局
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(textRoot);
|
||||
@@ -114,13 +113,13 @@ namespace AibisDream.FixSystem
|
||||
syncToken.TextShown();
|
||||
}
|
||||
|
||||
private TypewriterByCharacter AddText(string newLine)
|
||||
private TypewriterByCharacter AddText(LineSyncToken token)
|
||||
{
|
||||
// 生成新文本组件
|
||||
var textItem = Instantiate(_textItemPrefab, textRoot);
|
||||
var textItemTypewriter = textItem.GetComponent<TypewriterByCharacter>();
|
||||
// 估算文本高度
|
||||
var newLineNum = EstimateLineNum(newLine);
|
||||
var newLineNum = EstimateLineNum(token.lineInfo.lineText);
|
||||
var oldLineNum = CalcTotalLineNum();
|
||||
if (newLineNum + oldLineNum > maxLineNum)
|
||||
{
|
||||
@@ -129,7 +128,9 @@ namespace AibisDream.FixSystem
|
||||
_lineQueue.Enqueue(textItemTypewriter);
|
||||
|
||||
// 播放文本
|
||||
textItemTypewriter.ShowText(newLine);
|
||||
textItemTypewriter.SetTypewriterSpeed(GetTextSpeedValue());
|
||||
textItemTypewriter.onTextShowed.AddListener(() => OnTextShown(token, textItemTypewriter));
|
||||
textItemTypewriter.ShowText(token.lineInfo.lineText);
|
||||
|
||||
return textItemTypewriter;
|
||||
}
|
||||
|
||||
@@ -42,8 +42,7 @@ namespace AibisDream
|
||||
// 场景So事件注册
|
||||
_currentTalkSceneSo = new BindProperty<TalkSceneSO>();
|
||||
_currentTalkSceneSo.Register(item => _data.curSceneSoName = item.name);
|
||||
// 事件广播
|
||||
EnumEventSystem.Global.Send(GameLoopEnum.AppStart);
|
||||
|
||||
// 加载SO
|
||||
Addressables.LoadAssetsAsync<TalkSceneSO>("SceneSO", null).Completed += LoadTalkSo;
|
||||
|
||||
@@ -62,10 +61,14 @@ namespace AibisDream
|
||||
.Callback(() => UIManager.Instance.GetPanel<PlayToolPanel>().FadeInSync(0))
|
||||
.Coroutine(() => SceneLoader.Instance.LoadSceneAsync("ClinicOut"))
|
||||
.Callback(() => UIManager.Instance.GetPanel<PlayToolPanel>().FadeOutSync())
|
||||
.Callback(() => EnumEventSystem.Global.Send(GameLoopEnum.AppStart))
|
||||
.Start(this);
|
||||
}
|
||||
#else
|
||||
SceneLoader.Instance.LoadScene("ClinicOut");
|
||||
ActionKit.Sequence()
|
||||
.Coroutine(() => SceneLoader.Instance.LoadSceneAsync("ClinicOut"))
|
||||
.Callback(() => EnumEventSystem.Global.Send(GameLoopEnum.AppStart))
|
||||
.Start(this);
|
||||
runMode = RunMode.Product;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -377,6 +377,103 @@ PlayerSettings:
|
||||
m_Height: 36
|
||||
m_Kind: 0
|
||||
m_SubKind:
|
||||
- m_BuildTarget: iPhone
|
||||
m_Icons:
|
||||
- m_Textures: []
|
||||
m_Width: 180
|
||||
m_Height: 180
|
||||
m_Kind: 0
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 120
|
||||
m_Height: 120
|
||||
m_Kind: 0
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 167
|
||||
m_Height: 167
|
||||
m_Kind: 0
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 152
|
||||
m_Height: 152
|
||||
m_Kind: 0
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 76
|
||||
m_Height: 76
|
||||
m_Kind: 0
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 120
|
||||
m_Height: 120
|
||||
m_Kind: 3
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 80
|
||||
m_Height: 80
|
||||
m_Kind: 3
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 80
|
||||
m_Height: 80
|
||||
m_Kind: 3
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 40
|
||||
m_Height: 40
|
||||
m_Kind: 3
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 87
|
||||
m_Height: 87
|
||||
m_Kind: 1
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 58
|
||||
m_Height: 58
|
||||
m_Kind: 1
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 29
|
||||
m_Height: 29
|
||||
m_Kind: 1
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 58
|
||||
m_Height: 58
|
||||
m_Kind: 1
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 29
|
||||
m_Height: 29
|
||||
m_Kind: 1
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 60
|
||||
m_Height: 60
|
||||
m_Kind: 2
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 40
|
||||
m_Height: 40
|
||||
m_Kind: 2
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 40
|
||||
m_Height: 40
|
||||
m_Kind: 2
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 20
|
||||
m_Height: 20
|
||||
m_Kind: 2
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 1024
|
||||
m_Height: 1024
|
||||
m_Kind: 4
|
||||
m_SubKind: App Store
|
||||
m_BuildTargetBatching: []
|
||||
m_BuildTargetShaderSettings: []
|
||||
m_BuildTargetGraphicsJobs: []
|
||||
|
||||
Reference in New Issue
Block a user