任务:推进游戏的流程化

*:修复若干Bug

场景:【序章-家中】
1.让CG拥有结束事件
2.编写暂用CG的结束事件,即重新载入场景【序章-家中】并让其呈现开门演出的多态。
3.创建多态【开门演出】。
4.完成多态【开门演出】。
5.创建并填充对话【谈论父亲离开后的水缸】

下班。明天做开门进CG,然后就是第一关了。🙏加油吧。
This commit is contained in:
Roman 2021-08-14 01:43:04 +08:00
parent e28e55e025
commit bfe6054646
11 changed files with 336 additions and 30 deletions

View File

@ -44,6 +44,6 @@ Material:
- WaveIntensity_2: 1 - WaveIntensity_2: 1
- WaveSpread_Value: 0 - WaveSpread_Value: 0
m_Colors: m_Colors:
- Center: {r: 0.20606552, g: 0.31144482, b: 0, a: 0} - Center: {r: 0.04560378, g: 0.29311493, b: 0, a: 0}
- Vector2_d2d098295fc146f08b921b231b2e5199: {r: 1.6, g: 0.9, b: 0, a: 0} - Vector2_d2d098295fc146f08b921b231b2e5199: {r: 1.6, g: 0.9, b: 0, a: 0}
m_BuildTextureStacks: [] m_BuildTextureStacks: []

View File

@ -403,6 +403,8 @@ Transform:
- {fileID: 1342919998} - {fileID: 1342919998}
- {fileID: 1282872329} - {fileID: 1282872329}
- {fileID: 21934456} - {fileID: 21934456}
- {fileID: 1918217528}
- {fileID: 1156593139}
m_Father: {fileID: 1860666399} m_Father: {fileID: 1860666399}
m_RootOrder: 3 m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -602,7 +604,7 @@ Transform:
- {fileID: 1466476645} - {fileID: 1466476645}
- {fileID: 973378802} - {fileID: 973378802}
m_Father: {fileID: 1860666399} m_Father: {fileID: 1860666399}
m_RootOrder: 0 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &204256632 --- !u!1 &204256632
GameObject: GameObject:
@ -903,9 +905,11 @@ MonoBehaviour:
statesNames: statesNames:
- "\u5E8F\u7AE0-\u5BB6\u4E2D-\u672A\u6253\u7801" - "\u5E8F\u7AE0-\u5BB6\u4E2D-\u672A\u6253\u7801"
- "\u5E8F\u7AE0-\u5BB6\u4E2D-\u5DF2\u6253\u7801" - "\u5E8F\u7AE0-\u5BB6\u4E2D-\u5DF2\u6253\u7801"
- "\u5F00\u95E8\u6F14\u51FA"
statesEvents: statesEvents:
- {fileID: 0} - {fileID: 0}
- {fileID: 1282872330} - {fileID: 1282872330}
- {fileID: 1156593140}
--- !u!1 &439525097 --- !u!1 &439525097
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1061,7 +1065,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 448948445} m_GameObject: {fileID: 448948445}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -10.45097, y: -0.40661764, z: -10.977614} m_LocalPosition: {x: -20.35, y: 0.4, z: -10.977614}
m_LocalScale: {x: 2.05, y: 1, z: 1} m_LocalScale: {x: 2.05, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 716192431} m_Father: {fileID: 716192431}
@ -1427,7 +1431,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 1584681279} - {fileID: 1584681279}
m_Father: {fileID: 2114539721} m_Father: {fileID: 2114539721}
m_RootOrder: 7 m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@ -1495,7 +1499,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 642174518} m_GameObject: {fileID: 642174518}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 1.9100001, y: -0.79, z: -10} m_LocalPosition: {x: -11.039029, y: 0.08661765, z: -10}
m_LocalScale: {x: 40.825, y: 10.626138, z: 1} m_LocalScale: {x: 40.825, y: 10.626138, z: 1}
m_Children: m_Children:
- {fileID: 74982410} - {fileID: 74982410}
@ -1685,7 +1689,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 716192430} m_GameObject: {fileID: 716192430}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.24902977, y: -0.043382358, z: -0.09978611} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 929332388} - {fileID: 929332388}
@ -2635,7 +2639,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 929332385} m_GameObject: {fileID: 929332385}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.45902976, y: -1.9666176, z: -0.4102139} m_LocalPosition: {x: -9.98, y: -1.97, z: -0.4102139}
m_LocalScale: {x: 12.862, y: 1.6829, z: 1} m_LocalScale: {x: 12.862, y: 1.6829, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 716192431} m_Father: {fileID: 716192431}
@ -2859,6 +2863,147 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 44af76b20bca77a4a9f6f8d638137194, type: 3} m_Script: {fileID: 11500000, guid: 44af76b20bca77a4a9f6f8d638137194, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!1 &1041575543
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1041575546}
- component: {fileID: 1041575545}
- component: {fileID: 1041575544}
- component: {fileID: 1041575547}
- component: {fileID: 1041575548}
m_Layer: 0
m_Name: "\u8C03\u67E5\u7236\u4EB2\u79BB\u5F00\u540E\u7684\u6C34\u7F38"
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1041575544
MonoBehaviour:
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1041575543}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3}
m_Name:
m_EditorClassIdentifier:
nodeRect:
serializedVersion: 2
x: 67
y: 70
width: 112.4
height: 40
tint: {r: 1, g: 1, b: 1, a: 1}
useCustomTint: 0
itemId: 0
blockName: New Block
description:
eventHandler: {fileID: 1041575547}
commandList:
- {fileID: 1041575548}
suppressAllAutoSelections: 0
--- !u!114 &1041575545
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1041575543}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
blockViewHeight: 400
zoom: 1
scrollViewRect:
serializedVersion: 2
x: -343
y: -340
width: 1114
height: 859
selectedBlocks:
- {fileID: 1041575544}
selectedCommands: []
variables: []
description:
stepPause: 0
colorCommands: 1
hideComponents: 1
saveSelection: 1
localizationId:
showLineNumbers: 0
hideCommands: []
luaEnvironment: {fileID: 0}
luaBindingName: flowchart
--- !u!4 &1041575546
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1041575543}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2114539721}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1041575547
MonoBehaviour:
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1041575543}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2d7d417659cd54a6787f70f763950c34, type: 3}
m_Name:
m_EditorClassIdentifier:
parentBlock: {fileID: 1041575544}
suppressBlockAutoSelect: 0
message: "\u8C08\u8BBA\u7236\u4EB2\u79BB\u5F00\u540E\u7684\u6C34\u7F38"
--- !u!114 &1041575548
MonoBehaviour:
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1041575543}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 1
indentLevel: 0
storyText: "\u8FD9\u91CC\u5DF2\u7ECF\u7A7A\u4E86\u3002"
description:
character: {fileID: 995089250}
portrait: {fileID: 21300000, guid: 29e56f162a0374b44a23437dd6e68ca6, type: 3}
voiceOverClip: {fileID: 0}
showAlways: 1
showCount: 1
extendPrevious: 0
fadeWhenDone: 1
waitForClick: 1
stopVoiceover: 1
waitForVO: 0
setSayDialog: {fileID: 582064879}
--- !u!1 &1070038164 --- !u!1 &1070038164
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -3156,6 +3301,49 @@ MonoBehaviour:
stopVoiceover: 1 stopVoiceover: 1
waitForVO: 0 waitForVO: 0
setSayDialog: {fileID: 582064879} setSayDialog: {fileID: 582064879}
--- !u!1 &1156593138
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1156593139}
- component: {fileID: 1156593140}
m_Layer: 0
m_Name: "\u591A\u6001\uFF1A\u5F00\u95E8\u6F14\u51FA"
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1156593139
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1156593138}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 71136650}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1156593140
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1156593138}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8328cf3ed0c2e474b90e5fc825d743c3, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1170258146 --- !u!1 &1170258146
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -3617,7 +3805,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1256971098} m_GameObject: {fileID: 1256971098}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 1.3766689, y: -1.3787119, z: 0.40322465} m_LocalPosition: {x: -0.11, y: -1.3787119, z: 0.40322465}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 1728238377} - {fileID: 1728238377}
@ -3648,7 +3836,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1258629580} m_GameObject: {fileID: 1258629580}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 10.003331, y: -0.6412881, z: -0.40322465} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 1195339600} - {fileID: 1195339600}
@ -4011,7 +4199,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3} m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
selectedFlowchart: {fileID: 775073761} selectedFlowchart: {fileID: 1041575545}
--- !u!4 &1463945086 --- !u!4 &1463945086
Transform: Transform:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -4105,7 +4293,7 @@ RectTransform:
- {fileID: 1070038165} - {fileID: 1070038165}
- {fileID: 1701930268} - {fileID: 1701930268}
m_Father: {fileID: 2052706945} m_Father: {fileID: 2052706945}
m_RootOrder: 0 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
@ -4173,8 +4361,8 @@ Transform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1568214227} m_GameObject: {fileID: 1568214227}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.24902964, y: -0.043382347, z: -0.09978611} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 2048333218} - {fileID: 2048333218}
@ -4686,13 +4874,13 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1771706913} m_GameObject: {fileID: 1771706913}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 2125100632} - {fileID: 2125100632}
m_Father: {fileID: 2052706945} m_Father: {fileID: 2052706945}
m_RootOrder: 1 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
@ -5063,12 +5251,12 @@ Transform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1860666398} m_GameObject: {fileID: 1860666398}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.19999981, y: 0.87, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 192880847}
- {fileID: 2052706945} - {fileID: 2052706945}
- {fileID: 192880847}
- {fileID: 1223691864} - {fileID: 1223691864}
- {fileID: 71136650} - {fileID: 71136650}
- {fileID: 310835680} - {fileID: 310835680}
@ -5186,7 +5374,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1861856986} m_GameObject: {fileID: 1861856986}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 1.9100001, y: -0.79, z: -10} m_LocalPosition: {x: -11.039029, y: 0.08661765, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 716192431} m_Father: {fileID: 716192431}
@ -5226,6 +5414,49 @@ MonoBehaviour:
m_CameraActivatedEvent: m_CameraActivatedEvent:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
--- !u!1 &1918217527
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1918217528}
- component: {fileID: 1918217529}
m_Layer: 0
m_Name: "\u7236\u4EB2\u79BB\u5F00CG\u7ED3\u675F\u540E"
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1918217528
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1918217527}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 71136650}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1918217529
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1918217527}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 57eccdb17f53452439eea8f74f52cba5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1971227290 --- !u!1 &1971227290
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5495,7 +5726,7 @@ MonoBehaviour:
rateOfChangeOfThrowingAngle: 1 rateOfChangeOfThrowingAngle: 1
strengthOfThrowing: 8 strengthOfThrowing: 8
stageName: stageName:
CGFadeTime: 1 CGFadeTime: 2
--- !u!4 &2039349954 --- !u!4 &2039349954
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5531,11 +5762,11 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3719369086825294709, guid: e0481b76b4057fd4fad09cc46028b53a, type: 3} - target: {fileID: 3719369086825294709, guid: e0481b76b4057fd4fad09cc46028b53a, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -1.09 value: -14.039029
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3719369086825294709, guid: e0481b76b4057fd4fad09cc46028b53a, type: 3} - target: {fileID: 3719369086825294709, guid: e0481b76b4057fd4fad09cc46028b53a, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0.06 value: 0.9366177
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3719369086825294709, guid: e0481b76b4057fd4fad09cc46028b53a, type: 3} - target: {fileID: 3719369086825294709, guid: e0481b76b4057fd4fad09cc46028b53a, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
@ -5671,10 +5902,10 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 1500782588}
- {fileID: 1771706914} - {fileID: 1771706914}
- {fileID: 1500782588}
m_Father: {fileID: 1860666399} m_Father: {fileID: 1860666399}
m_RootOrder: 1 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@ -5856,7 +6087,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2114539720} m_GameObject: {fileID: 2114539720}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -1.9662995, y: -4.667943, z: -0.39541844} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 995089251} - {fileID: 995089251}
@ -5866,6 +6097,7 @@ Transform:
- {fileID: 866289587} - {fileID: 866289587}
- {fileID: 1971227291} - {fileID: 1971227291}
- {fileID: 775073759} - {fileID: 775073759}
- {fileID: 1041575546}
- {fileID: 582064884} - {fileID: 582064884}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 4 m_RootOrder: 4
@ -5916,6 +6148,7 @@ MonoBehaviour:
CGName: "\u6682\u7528" CGName: "\u6682\u7528"
texture: {fileID: 2800000, guid: b480a137df33db449a8cb87e70f6c8d8, type: 3} texture: {fileID: 2800000, guid: b480a137df33db449a8cb87e70f6c8d8, type: 3}
time: 3 time: 3
onEnded: {fileID: 1918217529}
--- !u!1001 &3945938555803748376 --- !u!1001 &3945938555803748376
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5994,11 +6227,11 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4912081361035269481, guid: 2ff4d949bf0f2f343893d8c570bf9f51, type: 3} - target: {fileID: 4912081361035269481, guid: 2ff4d949bf0f2f343893d8c570bf9f51, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 21.239029 value: 11.28
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4912081361035269481, guid: 2ff4d949bf0f2f343893d8c570bf9f51, type: 3} - target: {fileID: 4912081361035269481, guid: 2ff4d949bf0f2f343893d8c570bf9f51, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: -2.1466177 value: -1.27
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4912081361035269481, guid: 2ff4d949bf0f2f343893d8c570bf9f51, type: 3} - target: {fileID: 4912081361035269481, guid: 2ff4d949bf0f2f343893d8c570bf9f51, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z

View File

@ -1620,6 +1620,7 @@ MonoBehaviour:
rateOfChangeOfThrowingAngle: 1 rateOfChangeOfThrowingAngle: 1
strengthOfThrowing: 8 strengthOfThrowing: 8
stageName: stageName:
CGFadeTime: 2
--- !u!4 &1258254500 --- !u!4 &1258254500
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -7171,7 +7172,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2044422406} m_GameObject: {fileID: 2044422406}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.06417028, y: -1.0285301, z: -8.588372} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 927359185} - {fileID: 927359185}

View File

@ -0,0 +1,13 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class AfterFatherLeftCG : Event
{
public override void OnCall()
{
FindObjectOfType<IndexRecoder>().ChangeStageName("开门演出");//涉及多态,更改一下演出名
SceneManager.LoadScene("序章-家中");
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 57eccdb17f53452439eea8f74f52cba5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -12,7 +12,7 @@ public class AfterRecollection : Event
//Vector3(18.8199997,0.0599999987,0) //Vector3(18.8199997,0.0599999987,0)
//Vector3(19.2399998,0.0599999987,0) //Vector3(19.2399998,0.0599999987,0)
//1.改变玩家的位置到父亲身边 //1.改变玩家的位置到父亲身边
FindObjectOfType<M_Player>().transform.position = new Vector3(19.2399998f,0.0599999987f,0); FindObjectOfType<M_Player>().transform.position = new Vector3(9.30000019f,0.936617672f,0);
//2.触发对话【回忆之后的对话】 //2.触发对话【回忆之后的对话】
Flowchart.BroadcastFungusMessage("回忆之后的对话"); Flowchart.BroadcastFungusMessage("回忆之后的对话");
} }

View File

@ -0,0 +1,27 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class OpenDoorStage : Event
{
//【序章-家中】的多态之一,用于初始化父亲离家、玩家需要开门那一段
public override void OnCall()
{
Debug.Log("正在启动多态【开门演出】");
M_Player player = FindObjectOfType<M_Player>();//找到玩家
player.transform.position = new Vector3(12.8999996f,0.936617672f,0);//改变玩家位置
player.transform.localScale = new Vector3(
Mathf.Abs(transform.localScale.x)*-1,
transform.localScale.y,
transform.localScale.z);//修改玩家面部朝向为左
GameObject watertank = GameObject.Find("水缸");//找到水缸
watertank.transform.position = new Vector3(1.72000003f,-1.37871194f,0);//把水缸移开
watertank.GetComponentInChildren<NormalInvestableItems>().itemName = "父亲离开后的水缸";
Destroy(FindObjectOfType<Father>().gameObject);//摧毁父亲这个游戏物体
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8328cf3ed0c2e474b90e5fc825d743c3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -45,6 +45,8 @@ public class IndexRecoder : MonoBehaviour
void Start() void Start()
{ {
//Destroy(FindObjectOfType<IndexRecoder>().gameObject);
GameObject.DontDestroyOnLoad(gameObject); GameObject.DontDestroyOnLoad(gameObject);
//开发者捷径 //开发者捷径
codeBook.Add("..--.","864246511"); codeBook.Add("..--.","864246511");

View File

@ -11,5 +11,9 @@ using UnityEngine;
public Texture texture; public Texture texture;
[Tooltip("这个CG要显示多长时间")] [Tooltip("这个CG要显示多长时间")]
public float time; public float time;
[Tooltip("CG播放结束时要触发什么事件")]
public Event onEnded;
public void OnEnded(){onEnded.OnCall();}//触发结束事件不同CG事件不一样所以用public自己拖
} }

View File

@ -13,10 +13,12 @@ public class CGAdministrator : MonoBehaviour
[Tooltip("记录这个场景中的所有CG要加的话直接扩容数组并往新的CG里面加内容")] [Tooltip("记录这个场景中的所有CG要加的话直接扩容数组并往新的CG里面加内容")]
public ACG[] CGs; public ACG[] CGs;
private IndexRecoder indexRecoder; private IndexRecoder indexRecoder;
private ACG playingCG;//正在播放的CG因为invoke无法传参而存在
void Start() void Start()
{ {
rawImage = GetComponent<RawImage>(); rawImage = GetComponent<RawImage>();
indexRecoder = FindObjectOfType<IndexRecoder>(); indexRecoder = FindObjectOfType<IndexRecoder>();
rawImage.CrossFadeAlpha(0,0,true);//为了淡入显示必须先把它的阿尔法值降到0对吧
} }
// Update is called once per frame // Update is called once per frame
@ -37,13 +39,15 @@ public class CGAdministrator : MonoBehaviour
Debug.Log("正在显示CG"+CG.name); Debug.Log("正在显示CG"+CG.name);
rawImage.texture = CG.texture;//把CG的内容装载上 rawImage.texture = CG.texture;//把CG的内容装载上
rawImage.CrossFadeAlpha(1,indexRecoder.CGFadeTime,true);//淡入显示CG rawImage.CrossFadeAlpha(1,indexRecoder.CGFadeTime,true);//淡入显示CG
playingCG = CG;
Invoke("StopIt",CG.time); Invoke("StopIt",CG.time);
} }
} }
} }
//改变标记使管理员意识到CG该停了 //改变标记使管理员意识到CG该停了
private void StopIt(){rawImage.CrossFadeAlpha(0f,indexRecoder.CGFadeTime,true);}//淡出CG private void StopIt(){rawImage.CrossFadeAlpha(0f,indexRecoder.CGFadeTime,true);//淡出CG
playingCG.OnEnded();}//告诉这个CG它结束了然后触发它的结束事件
//制造一个只读的变量,不要动这些 //制造一个只读的变量,不要动这些
public class ReadOnlyAttribute : PropertyAttribute{} public class ReadOnlyAttribute : PropertyAttribute{}