浏览代码

Now DialogueBehaviour takes care of disabling UI dialogue when not paused

/main
Amel Negra 3 年前
当前提交
a557f23b
共有 5 个文件被更改,包括 40 次插入0 次删除
  1. 6
      UOP1_Project/Assets/Scenes/Managers/Gameplay.unity
  2. 3
      UOP1_Project/Assets/Scripts/Cutscenes/CutsceneManager.cs
  3. 8
      UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueBehaviour.cs
  4. 15
      UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/LineEndedTimeline.asset
  5. 8
      UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/LineEndedTimeline.asset.meta

6
UOP1_Project/Assets/Scenes/Managers/Gameplay.unity


propertyPath: _dialogueManager
value:
objectReference: {fileID: 670213351}
- target: {fileID: 1395789391861871560, guid: acaae42dd59e9664faee318857afc823,
type: 3}
propertyPath: _onLineEndedEvent
value:
objectReference: {fileID: 11400000, guid: 8c589a71a937d334db35937f7b5bb25e,
type: 2}
- target: {fileID: 1395789391861871561, guid: acaae42dd59e9664faee318857afc823,
type: 3}
propertyPath: m_Name

3
UOP1_Project/Assets/Scripts/Cutscenes/CutsceneManager.cs


[SerializeField] public VoidEventChannelSO _pauseTimelineEvent = default;
[SerializeField] public VoidEventChannelSO _onLineEndedEvent = default;
private PlayableDirector _activePlayableDirector;
private bool _isPaused;

_playCutsceneEvent.OnEventRaised += PlayCutscene;
_playDialogueEvent.OnEventRaised += PlayDialogueFromClip;
_pauseTimelineEvent.OnEventRaised += PauseTimeline;
_onLineEndedEvent.OnEventRaised += LineEnded ;
}
void PlayCutscene(PlayableDirector activePlayableDirector)

8
UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueBehaviour.cs


[HideInInspector] public DialogueLineChannelSO PlayDialogueEvent;
[HideInInspector] public VoidEventChannelSO PauseTimelineEvent;
[SerializeField] public VoidEventChannelSO LineEndedEvent;
private bool _dialoguePlayed;

&& _dialoguePlayed)
{
if (_pauseWhenClipEnds)
{
}
else
{
//We need to disable the dialogue UI when the line is finished
LineEndedEvent.RaiseEvent();
}
}
}
}

15
UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/LineEndedTimeline.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7fafac715ff920c4383fed91a38a351e, type: 3}
m_Name: LineEndedTimeline
m_EditorClassIdentifier:
description:

8
UOP1_Project/Assets/ScriptableObjects/Events/Cutscene/LineEndedTimeline.asset.meta


fileFormatVersion: 2
guid: 8c589a71a937d334db35937f7b5bb25e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存