浏览代码

Separated Timeline scene loading from the LocationExit script

/main
Amel 3 年前
当前提交
6520caab
共有 7 个文件被更改,包括 114 次插入74 次删除
  1. 41
      UOP1_Project/Assets/Prefabs/Cutscenes/BeachGameEndCutscene.prefab
  2. 112
      UOP1_Project/Assets/Prefabs/Cutscenes/SweetDishCutscene.prefab
  3. 8
      UOP1_Project/Assets/Scripts/SceneManagement/LocationExit.cs
  4. 16
      UOP1_Project/Assets/Scripts/Cutscenes/CutsceneSceneLoader.cs
  5. 11
      UOP1_Project/Assets/Scripts/Cutscenes/CutsceneSceneLoader.cs.meta
  6. 0
      /UOP1_Project/Assets/Scripts/Cutscenes/CutsceneAudioConfigSetter.cs
  7. 0
      /UOP1_Project/Assets/Scripts/Cutscenes/CutsceneAudioConfigSetter.cs.meta

41
UOP1_Project/Assets/Prefabs/Cutscenes/BeachGameEndCutscene.prefab


ModeOverride: 0
LensShift: {x: 0, y: 0}
GateFit: 2
m_SensorSize: {x: 2.7390106, y: 1}
m_SensorSize: {x: 1.9894445, y: 1}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0

ModeOverride: 0
LensShift: {x: 0, y: 0}
GateFit: 2
m_SensorSize: {x: 2.7390106, y: 1}
m_SensorSize: {x: 1.9894445, y: 1}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0

serializedVersion: 6
m_Component:
- component: {fileID: 9086061863206215909}
- component: {fileID: 7006415184538745756}
- component: {fileID: 1513774127311603601}
m_Layer: 0
m_Name: MainMenuSceneLoader
m_TagString: Untagged

m_Father: {fileID: 3099274937134098496}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &7006415184538745756
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3726207256704925240}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 02e6b73898a4a52438d630a7ba29da77, type: 3}
m_Name:
m_EditorClassIdentifier:
_locationToLoad: {fileID: 11400000, guid: 431ff81b74b48fb4d9301fb76ca633dd, type: 2}
_leadsToPath: {fileID: 0}
_pathStorage: {fileID: 11400000, guid: a9ec09853cba047a8a58f5881053cfc6, type: 2}
_locationExitLoadChannel: {fileID: 11400000, guid: 33cec85652903d245b99985f9cec9841,
type: 2}
--- !u!114 &2313194055260239634
MonoBehaviour:
m_ObjectHideFlags: 0

m_Events:
- m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 7006415184538745756}
m_TargetAssemblyTypeName: LocationExit, Assembly-CSharp
- m_Target: {fileID: 1513774127311603601}
m_TargetAssemblyTypeName: CutsceneSceneLoader, Assembly-CSharp
m_MethodName: LoadScene
m_Mode: 1
m_Arguments:

m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1513774127311603601
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3726207256704925240}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: af0ba6b30850e36419a21b4175d8e655, type: 3}
m_Name:
m_EditorClassIdentifier:
_sceneToLoad: {fileID: 11400000, guid: 431ff81b74b48fb4d9301fb76ca633dd, type: 2}
_sceneLoadChannel: {fileID: 11400000, guid: 33cec85652903d245b99985f9cec9841, type: 2}
--- !u!95 &1488944481849032395
Animator:
serializedVersion: 3

112
UOP1_Project/Assets/Prefabs/Cutscenes/SweetDishCutscene.prefab


ModeOverride: 0
LensShift: {x: 0, y: 0}
GateFit: 2
m_SensorSize: {x: 2.7390106, y: 1}
m_SensorSize: {x: 2.0951056, y: 1}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0

ModeOverride: 0
LensShift: {x: 0, y: 0}
GateFit: 2
m_SensorSize: {x: 2.7390106, y: 1}
m_SensorSize: {x: 2.0951056, y: 1}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0

ModeOverride: 0
LensShift: {x: 0, y: 0}
GateFit: 2
m_SensorSize: {x: 2.7390106, y: 1}
m_SensorSize: {x: 2.0951056, y: 1}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0

ModeOverride: 0
LensShift: {x: 0, y: 0}
GateFit: 2
m_SensorSize: {x: 2.7390106, y: 1}
m_SensorSize: {x: 2.0951056, y: 1}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0

ModeOverride: 0
LensShift: {x: 0, y: 0}
GateFit: 2
m_SensorSize: {x: 2.7390106, y: 1}
m_SensorSize: {x: 2.0951056, y: 1}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0

ModeOverride: 0
LensShift: {x: 0, y: 0}
GateFit: 2
m_SensorSize: {x: 2.7390106, y: 1}
m_SensorSize: {x: 2.0951056, y: 1}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0

serializedVersion: 6
m_Component:
- component: {fileID: 2021596533}
- component: {fileID: 7955707696585730547}
- component: {fileID: 9199414420097767683}
m_Layer: 0
m_Name: CreditsSceneLoader
m_TagString: Untagged

m_Father: {fileID: 3336172139464101627}
m_RootOrder: 16
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &7955707696585730547
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2021596532}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 02e6b73898a4a52438d630a7ba29da77, type: 3}
m_Name:
m_EditorClassIdentifier:
_locationToLoad: {fileID: 11400000, guid: 7f8ed3292b055484c81ecef146e54693, type: 2}
_leadsToPath: {fileID: 0}
_pathStorage: {fileID: 11400000, guid: a9ec09853cba047a8a58f5881053cfc6, type: 2}
_locationExitLoadChannel: {fileID: 11400000, guid: 33cec85652903d245b99985f9cec9841,
type: 2}
--- !u!114 &52669666117061954
MonoBehaviour:
m_ObjectHideFlags: 0

m_Events:
- m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 7955707696585730547}
m_TargetAssemblyTypeName: LocationExit, Assembly-CSharp
- m_Target: {fileID: 9199414420097767683}
m_TargetAssemblyTypeName: CutsceneSceneLoader, Assembly-CSharp
m_MethodName: LoadScene
m_Mode: 1
m_Arguments:

m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &9199414420097767683
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2021596532}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: af0ba6b30850e36419a21b4175d8e655, type: 3}
m_Name:
m_EditorClassIdentifier:
_sceneToLoad: {fileID: 11400000, guid: 7f8ed3292b055484c81ecef146e54693, type: 2}
_sceneLoadChannel: {fileID: 11400000, guid: 33cec85652903d245b99985f9cec9841, type: 2}
--- !u!114 &1753820939
MonoBehaviour:
m_ObjectHideFlags: 0

ModeOverride: 0
LensShift: {x: 0, y: 0}
GateFit: 2
m_SensorSize: {x: 2.7390106, y: 1}
m_SensorSize: {x: 2.0951056, y: 1}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0

ModeOverride: 0
LensShift: {x: 0, y: 0}
GateFit: 2
m_SensorSize: {x: 2.7390106, y: 1}
m_SensorSize: {x: 2.0951056, y: 1}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0

ModeOverride: 0
LensShift: {x: 0, y: 0}
GateFit: 2
m_SensorSize: {x: 2.7390106, y: 1}
m_SensorSize: {x: 2.0951056, y: 1}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0

ModeOverride: 0
LensShift: {x: 0, y: 0}
GateFit: 2
m_SensorSize: {x: 2.7390106, y: 1}
m_SensorSize: {x: 2.0951056, y: 1}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0

ModeOverride: 0
LensShift: {x: 0, y: 0}
GateFit: 2
m_SensorSize: {x: 2.7390106, y: 1}
m_SensorSize: {x: 2.0951056, y: 1}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0

objectReference: {fileID: 0}
- target: {fileID: 9174194076251962321, guid: de38e4bbfe5a86541bd140156b6a6d75,
type: 3}
propertyPath: m_LocalRotation.w
value: -0.99889797
objectReference: {fileID: 0}
- target: {fileID: 9174194076251962321, guid: de38e4bbfe5a86541bd140156b6a6d75,
type: 3}
value: -0.046576772
value: -0.046934947
value: -0.000000022351742
value: -0.000000022523626
value: -9.313226e-10
value: -9.384844e-10
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: de38e4bbfe5a86541bd140156b6a6d75, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 9174194076251962321, guid: e985e01604b92c748b406abe21d04bb1,
type: 3}
propertyPath: m_LocalRotation.w
value: -0.99889797
objectReference: {fileID: 0}
- target: {fileID: 9174194076251962321, guid: e985e01604b92c748b406abe21d04bb1,
type: 3}
value: -0.046576772
value: -0.046934947
value: 0.000000007450581
value: 0.000000007507875
value: 4.656613e-10
value: 4.692422e-10
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e985e01604b92c748b406abe21d04bb1, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 9174194076251962321, guid: daac470300224a54cbcf7956b2840867,
type: 3}
propertyPath: m_LocalRotation.w
value: -0.99889797
objectReference: {fileID: 0}
- target: {fileID: 9174194076251962321, guid: daac470300224a54cbcf7956b2840867,
type: 3}
value: -0.046576764
value: -0.04693494
value: -0.000000029802322
value: -0.0000000300315
value: -0.0000000013969839
value: -0.0000000014077266
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: daac470300224a54cbcf7956b2840867, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 5901927367508590655, guid: 7de901f9ebf649b4ab38959350c87dc9,
type: 3}
propertyPath: m_LocalRotation.w
value: -0.99889797
objectReference: {fileID: 0}
- target: {fileID: 5901927367508590655, guid: 7de901f9ebf649b4ab38959350c87dc9,
type: 3}
value: -0.046576772
value: -0.046934947
value: 0.000000014901161
value: 0.00000001501575
value: 9.313226e-10
value: 9.384844e-10
objectReference: {fileID: 0}
- target: {fileID: 8096454886103390463, guid: 7de901f9ebf649b4ab38959350c87dc9,
type: 3}

objectReference: {fileID: 0}
- target: {fileID: 5385405162533204186, guid: 661c491ac76af4b429f8a8c0e6e8c762,
type: 3}
propertyPath: m_LocalRotation.w
value: -0.9912751
objectReference: {fileID: 0}
- target: {fileID: 5385405162533204186, guid: 661c491ac76af4b429f8a8c0e6e8c762,
type: 3}
value: -0.04657677
value: -0.13180931
value: -1e-45
value: -4e-45
objectReference: {fileID: 0}
- target: {fileID: 5385405162533204186, guid: 661c491ac76af4b429f8a8c0e6e8c762,
type: 3}

8
UOP1_Project/Assets/Scripts/SceneManagement/LocationExit.cs


if (other.CompareTag("Player"))
{
_pathStorage.lastPathTaken = _leadsToPath;
LoadScene();
_locationExitLoadChannel.RaiseEvent(_locationToLoad, false, true);
}
//Used to load a location from a custscene
public void LoadScene()
{
_locationExitLoadChannel.RaiseEvent(_locationToLoad, false, true);
}
}

16
UOP1_Project/Assets/Scripts/Cutscenes/CutsceneSceneLoader.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CutsceneSceneLoader : MonoBehaviour
{
[SerializeField] private GameSceneSO _sceneToLoad = default;
[Header("Broadcasting on")]
[SerializeField] private LoadEventChannelSO _sceneLoadChannel = default;
//Used to load a location from a custscene
public void LoadScene()
{
_sceneLoadChannel.RaiseEvent(_sceneToLoad, false, true);
}
}

11
UOP1_Project/Assets/Scripts/Cutscenes/CutsceneSceneLoader.cs.meta


fileFormatVersion: 2
guid: af0ba6b30850e36419a21b4175d8e655
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

/UOP1_Project/Assets/Scripts/CutsceneAudioConfigSetter.cs → /UOP1_Project/Assets/Scripts/Cutscenes/CutsceneAudioConfigSetter.cs

/UOP1_Project/Assets/Scripts/CutsceneAudioConfigSetter.cs.meta → /UOP1_Project/Assets/Scripts/Cutscenes/CutsceneAudioConfigSetter.cs.meta

正在加载...
取消
保存