add scene transition
This commit is contained in:
@@ -715,6 +715,75 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::TeleportHandler
|
m_EditorClassIdentifier: Assembly-CSharp::TeleportHandler
|
||||||
blackScreenObject: {fileID: 1047025329}
|
blackScreenObject: {fileID: 1047025329}
|
||||||
|
--- !u!1 &127908877
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 127908880}
|
||||||
|
- component: {fileID: 127908879}
|
||||||
|
- component: {fileID: 127908878}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: DoorEntrance
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &127908878
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 127908877}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 8e99e84716dcf704abb5593bc6c91a40, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::SceneDoor
|
||||||
|
DoorId: 0
|
||||||
|
SceneToLoad: TestScene2
|
||||||
|
IdOfCorrespondingDoor: 0
|
||||||
|
--- !u!65 &127908879
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 127908877}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 1
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 0.4, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!4 &127908880
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 127908877}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
|
||||||
|
m_LocalPosition: {x: -0.47499996, y: 34.3, z: 0.00000012626319}
|
||||||
|
m_LocalScale: {x: 1.1708915, y: 69.57974, z: 1.1708915}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 902781402}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
|
||||||
--- !u!1 &130527586
|
--- !u!1 &130527586
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -3624,6 +3693,119 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &902781401
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 902781402}
|
||||||
|
- component: {fileID: 902781405}
|
||||||
|
- component: {fileID: 902781404}
|
||||||
|
- component: {fileID: 902781403}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: TestSceneDoor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &902781402
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 902781401}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: 0.93041223, z: -0, w: 0.3665149}
|
||||||
|
m_LocalPosition: {x: -2.896, y: 3.43913, z: -6.661}
|
||||||
|
m_LocalScale: {x: 1, y: 0.014372, z: 0.7081001}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 127908880}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 136.998, z: 0}
|
||||||
|
--- !u!65 &902781403
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 902781401}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!23 &902781404
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 902781401}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||||
|
m_RayTracingAccelStructBuildFlags: 1
|
||||||
|
m_SmallMeshCulling: 1
|
||||||
|
m_ForceMeshLod: -1
|
||||||
|
m_MeshLodSelectionBias: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_GlobalIlluminationMeshLod: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!33 &902781405
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 902781401}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
--- !u!1 &986462055
|
--- !u!1 &986462055
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -4036,11 +4218,11 @@ GameObject:
|
|||||||
- component: {fileID: 1047025329}
|
- component: {fileID: 1047025329}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: BlackScreen
|
m_Name: BlackScreen
|
||||||
m_TagString: Untagged
|
m_TagString: BlackScreen
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &1047025328
|
--- !u!224 &1047025328
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -4098,6 +4280,188 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1047025327}
|
m_GameObject: {fileID: 1047025327}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &1055802462
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1055802463}
|
||||||
|
- component: {fileID: 1055802466}
|
||||||
|
- component: {fileID: 1055802465}
|
||||||
|
- component: {fileID: 1055802464}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: TestSceneDoor (1)
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1055802463
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1055802462}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: 0.36247146, z: -0, w: -0.93199486}
|
||||||
|
m_LocalPosition: {x: 1.868, y: 3.43913, z: -2.248}
|
||||||
|
m_LocalScale: {x: 1, y: 0.014372, z: 0.7081001}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 1072227175}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 317.496, z: 0}
|
||||||
|
--- !u!65 &1055802464
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1055802462}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!23 &1055802465
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1055802462}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||||
|
m_RayTracingAccelStructBuildFlags: 1
|
||||||
|
m_SmallMeshCulling: 1
|
||||||
|
m_ForceMeshLod: -1
|
||||||
|
m_MeshLodSelectionBias: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_GlobalIlluminationMeshLod: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!33 &1055802466
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1055802462}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!1 &1072227172
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1072227175}
|
||||||
|
- component: {fileID: 1072227174}
|
||||||
|
- component: {fileID: 1072227173}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: DoorEntrance
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1072227173
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1072227172}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 8e99e84716dcf704abb5593bc6c91a40, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::SceneDoor
|
||||||
|
DoorId: 1
|
||||||
|
SceneToLoad: TestScene2
|
||||||
|
IdOfCorrespondingDoor: 1
|
||||||
|
--- !u!65 &1072227174
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1072227172}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 1
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 0.4, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!4 &1072227175
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1072227172}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
|
||||||
|
m_LocalPosition: {x: -0.47499996, y: 34.3, z: 0.00000012626319}
|
||||||
|
m_LocalScale: {x: 1.1708915, y: 69.57974, z: 1.1708915}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1055802463}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
|
||||||
--- !u!1 &1114011169
|
--- !u!1 &1114011169
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -4372,6 +4736,53 @@ BoxCollider2D:
|
|||||||
m_AutoTiling: 0
|
m_AutoTiling: 0
|
||||||
m_Size: {x: 1, y: 1}
|
m_Size: {x: 1, y: 1}
|
||||||
m_EdgeRadius: 0
|
m_EdgeRadius: 0
|
||||||
|
--- !u!1 &1151987834
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1151987836}
|
||||||
|
- component: {fileID: 1151987835}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: GameSceneManager
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1151987835
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1151987834}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 53b8d8c9181974149990f96ea419a6c1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::GameSceneManager
|
||||||
|
SceneDoors:
|
||||||
|
- {fileID: 127908878}
|
||||||
|
- {fileID: 1072227173}
|
||||||
|
--- !u!4 &1151987836
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1151987834}
|
||||||
|
serializedVersion: 2
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &1176814029
|
--- !u!1 &1176814029
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -7656,5 +8067,8 @@ SceneRoots:
|
|||||||
- {fileID: 1892268943}
|
- {fileID: 1892268943}
|
||||||
- {fileID: 1502779279}
|
- {fileID: 1502779279}
|
||||||
- {fileID: 1854015638}
|
- {fileID: 1854015638}
|
||||||
|
- {fileID: 902781402}
|
||||||
|
- {fileID: 1055802463}
|
||||||
- {fileID: 562959766}
|
- {fileID: 562959766}
|
||||||
- {fileID: 2075083864}
|
- {fileID: 2075083864}
|
||||||
|
- {fileID: 1151987836}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: dc8686ebd52fffb4d92829e021ac41ca
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Unity.VectorGraphics;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class GameManager : MonoBehaviour
|
public class GameManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
@@ -8,13 +12,18 @@ public class GameManager : MonoBehaviour
|
|||||||
public Inventory Inventory { get; private set; }
|
public Inventory Inventory { get; private set; }
|
||||||
public Storybools Storybools { get; private set; }
|
public Storybools Storybools { get; private set; }
|
||||||
|
|
||||||
|
// Are we currently in a scene transition?
|
||||||
|
private bool isTransitioningScenes = false;
|
||||||
|
private Image blackScreen;
|
||||||
|
private PlayerController playerController;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
// If there is an instance, and it's not me, delete myself.
|
// If there is an instance, and it's not me, delete myself.
|
||||||
|
|
||||||
if (Instance != null && Instance != this)
|
if (Instance != null && Instance != this)
|
||||||
{
|
{
|
||||||
Destroy(this);
|
Destroy(this.gameObject);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -23,12 +32,97 @@ private void Awake()
|
|||||||
|
|
||||||
DontDestroyOnLoad(gameObject);
|
DontDestroyOnLoad(gameObject);
|
||||||
|
|
||||||
DialogueManager = GetComponent<DialogueManager>();
|
ReloadReferences();
|
||||||
Inventory = GetComponent<Inventory>();
|
|
||||||
SaveSystem.Load();
|
SaveSystem.Load();
|
||||||
SaveSystem.Save(); // save off any corruption fixes
|
SaveSystem.Save(); // save off any corruption fixes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Grab everything the GameManager needs to keep track of
|
||||||
|
/// </summary>
|
||||||
|
private void ReloadReferences()
|
||||||
|
{
|
||||||
|
blackScreen = GameObject.FindWithTag("BlackScreen").GetComponent<Image>();
|
||||||
|
playerController = GameObject.FindWithTag("Player").GetComponent<PlayerController>();
|
||||||
|
DialogueManager = GetComponent<DialogueManager>();
|
||||||
|
Inventory = GetComponent<Inventory>();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Triggers transition to specified scene at the door with the specified ID
|
||||||
|
/// </summary>
|
||||||
|
public void EnterSceneDoor(string scene, int door)
|
||||||
|
{
|
||||||
|
StartCoroutine(EnterSceneDoorCoroutine(scene, door));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Executes transition to specified scene at the door with the specified ID
|
||||||
|
/// </summary>
|
||||||
|
private IEnumerator EnterSceneDoorCoroutine(string scene, int doorId)
|
||||||
|
{
|
||||||
|
isTransitioningScenes = true;
|
||||||
|
|
||||||
|
// Fade to black
|
||||||
|
float fadeDuration = 0.2f;
|
||||||
|
float fadeTime = 0;
|
||||||
|
Color blackScreenColor = Color.black;
|
||||||
|
|
||||||
|
while (fadeTime < fadeDuration)
|
||||||
|
{
|
||||||
|
blackScreenColor.a = Mathf.Lerp(0, 1, fadeTime / fadeDuration);
|
||||||
|
blackScreen.color = blackScreenColor;
|
||||||
|
fadeTime += Time.deltaTime;
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
fadeTime = 0;
|
||||||
|
|
||||||
|
|
||||||
|
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(scene);
|
||||||
|
while (!asyncLoad.isDone)
|
||||||
|
{
|
||||||
|
// Optional: Update a loading bar with asyncLoad.progress
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReloadReferences();
|
||||||
|
|
||||||
|
// Make sure screen is black in new scene
|
||||||
|
blackScreen.color = blackScreenColor;
|
||||||
|
|
||||||
|
if (playerController != null && GameSceneManager.Instance != null)
|
||||||
|
{
|
||||||
|
SceneDoor door = GameSceneManager.Instance.GetDoorWithId(doorId);
|
||||||
|
|
||||||
|
if (door != null)
|
||||||
|
{
|
||||||
|
playerController.CharacterControllerMove(door.gameObject.transform.position - playerController.transform.position);
|
||||||
|
playerController.DougBody.transform.rotation = door.gameObject.transform.rotation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fade back in
|
||||||
|
while (fadeTime < fadeDuration)
|
||||||
|
{
|
||||||
|
blackScreenColor.a = Mathf.Lerp(1, 0, fadeTime / fadeDuration);
|
||||||
|
blackScreen.color = blackScreenColor;
|
||||||
|
fadeTime += Time.deltaTime;
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
fadeTime = 0;
|
||||||
|
|
||||||
|
isTransitioningScenes = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Are we currently in the middle of a scene transition?
|
||||||
|
/// </summary>
|
||||||
|
public bool InSceneTransition()
|
||||||
|
{
|
||||||
|
return isTransitioningScenes;
|
||||||
|
}
|
||||||
|
|
||||||
#region Storybool Save/Load
|
#region Storybool Save/Load
|
||||||
public void SaveStoryBools(ref StoryboolSaveData data)
|
public void SaveStoryBools(ref StoryboolSaveData data)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
// Manages scene-specific info, WILL be destroyed on load, and there is one of these
|
||||||
|
// in each scene
|
||||||
|
public class GameSceneManager : MonoBehaviour
|
||||||
|
{
|
||||||
|
public static GameSceneManager Instance { get; private set; }
|
||||||
|
|
||||||
|
// This is a list of doors that take us to different scenes. We'll use this
|
||||||
|
// to tell the GameManager which door to put us at when we enter a new scene.
|
||||||
|
public List<SceneDoor> SceneDoors;
|
||||||
|
|
||||||
|
public SceneDoor GetDoorWithId(int id)
|
||||||
|
{
|
||||||
|
return SceneDoors.Find(x => x.DoorId == id);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
// If there is an instance, and it's not me, delete myself.
|
||||||
|
|
||||||
|
if (Instance != null && Instance != this)
|
||||||
|
{
|
||||||
|
Destroy(this);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Instance = this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 53b8d8c9181974149990f96ea419a6c1
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class SceneDoor : Interactable
|
||||||
|
{
|
||||||
|
// ID of THIS door
|
||||||
|
public int DoorId = 0;
|
||||||
|
|
||||||
|
// What scene does this door take us to?
|
||||||
|
public string SceneToLoad = "";
|
||||||
|
|
||||||
|
// Which door does this lead to in the scene this door takes us to?
|
||||||
|
public int IdOfCorrespondingDoor = 0;
|
||||||
|
|
||||||
|
public override void Interact()
|
||||||
|
{
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void MoveInsideRange()
|
||||||
|
{
|
||||||
|
if (!GameManager.Instance.InSceneTransition())
|
||||||
|
GameManager.Instance.EnterSceneDoor(SceneToLoad, DoorId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void MoveOutsideRange()
|
||||||
|
{
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8e99e84716dcf704abb5593bc6c91a40
|
||||||
@@ -41,7 +41,6 @@ IEnumerator EnterRoomCoroutine(RoomDoor door)
|
|||||||
if (door.requiresInteraction)
|
if (door.requiresInteraction)
|
||||||
yield return new WaitForSeconds(0.2f);
|
yield return new WaitForSeconds(0.2f);
|
||||||
|
|
||||||
blackScreenObject.gameObject.SetActive(true);
|
|
||||||
while (fadeTime < fadeDuration)
|
while (fadeTime < fadeDuration)
|
||||||
{
|
{
|
||||||
blackScreenColor.a = Mathf.Lerp(0, 1, fadeTime / fadeDuration);
|
blackScreenColor.a = Mathf.Lerp(0, 1, fadeTime / fadeDuration);
|
||||||
@@ -63,8 +62,6 @@ IEnumerator EnterRoomCoroutine(RoomDoor door)
|
|||||||
}
|
}
|
||||||
fadeTime = 0;
|
fadeTime = 0;
|
||||||
|
|
||||||
blackScreenObject.gameObject.SetActive(false);
|
|
||||||
|
|
||||||
// Play exit animation for linked door (if it exists)
|
// Play exit animation for linked door (if it exists)
|
||||||
door.linkedDoor.CloseDoor();
|
door.linkedDoor.CloseDoor();
|
||||||
yield return new WaitForSeconds(0.2f);
|
yield return new WaitForSeconds(0.2f);
|
||||||
|
|||||||
@@ -8,5 +8,8 @@ EditorBuildSettings:
|
|||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Scenes/SampleScene.unity
|
path: Assets/Scenes/SampleScene.unity
|
||||||
guid: 99c9720ab356a0642a771bea13969a05
|
guid: 99c9720ab356a0642a771bea13969a05
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/Scenes/TestScene2.unity
|
||||||
|
guid: dc8686ebd52fffb4d92829e021ac41ca
|
||||||
m_configObjects: {}
|
m_configObjects: {}
|
||||||
m_UseUCBPForAssetBundles: 0
|
m_UseUCBPForAssetBundles: 0
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ TagManager:
|
|||||||
- Shovel
|
- Shovel
|
||||||
- InventorySlots
|
- InventorySlots
|
||||||
- Door
|
- Door
|
||||||
|
- BlackScreen
|
||||||
layers:
|
layers:
|
||||||
- Default
|
- Default
|
||||||
- TransparentFX
|
- TransparentFX
|
||||||
|
|||||||
Reference in New Issue
Block a user