fr.jeanf.eventsystem 0.1.93 → 0.1.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,7 +26,7 @@ namespace jeanf.EventSystem
|
|
|
26
26
|
}
|
|
27
27
|
[SerializeField] private bool _isDebug = false;
|
|
28
28
|
|
|
29
|
-
[SerializeField] private TimelineTriggerEventChannelSO _channel
|
|
29
|
+
[SerializeField] private TimelineTriggerEventChannelSO _channel;
|
|
30
30
|
[SerializeField] private PlayableDirector _playableDirectorToControl;
|
|
31
31
|
[Tooltip("Use this if you want to override the timeline assigned to the playable director.")]
|
|
32
32
|
[SerializeField] private bool assignTimelineToPlayableDirector = true;
|
|
@@ -52,15 +52,17 @@ namespace jeanf.EventSystem
|
|
|
52
52
|
if (assignTimelineToPlayableDirector) _playableDirectorToControl.playableAsset = timeline;
|
|
53
53
|
if(timeline != _playableDirectorToControl.playableAsset) return;
|
|
54
54
|
OnEventRaised?.Invoke(timeline, value);
|
|
55
|
-
|
|
55
|
+
switch (value)
|
|
56
56
|
{
|
|
57
|
-
|
|
57
|
+
case true:
|
|
58
|
+
_playableDirectorToControl.Play();
|
|
59
|
+
if(isDebug) Debug.Log($" received timeline play instruction: <{timeline},{value}>");
|
|
60
|
+
break;
|
|
61
|
+
case false when timeline == _playableDirectorToControl.playableAsset:
|
|
62
|
+
_playableDirectorToControl.Stop();
|
|
63
|
+
if(isDebug) Debug.Log($" received timeline stop instruction: <{timeline},{value}>");
|
|
64
|
+
break;
|
|
58
65
|
}
|
|
59
|
-
else
|
|
60
|
-
{
|
|
61
|
-
_playableDirectorToControl.Stop();
|
|
62
|
-
}
|
|
63
|
-
if(isDebug) Debug.Log($" timeline-bool event raised: <{timeline},{value}>");
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
%YAML 1.1
|
|
2
|
+
%TAG !u! tag:unity3d.com,2011:
|
|
3
|
+
--- !u!114 &11400000
|
|
4
|
+
MonoBehaviour:
|
|
5
|
+
m_ObjectHideFlags: 0
|
|
6
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
7
|
+
m_PrefabInstance: {fileID: 0}
|
|
8
|
+
m_PrefabAsset: {fileID: 0}
|
|
9
|
+
m_GameObject: {fileID: 0}
|
|
10
|
+
m_Enabled: 1
|
|
11
|
+
m_EditorHideFlags: 0
|
|
12
|
+
m_Script: {fileID: 11500000, guid: e0ed7a8546959a8479bb135ed3cf5fc1, type: 3}
|
|
13
|
+
m_Name: ObjectTakenChannelSO
|
|
14
|
+
m_EditorClassIdentifier:
|
|
15
|
+
_guid:
|
|
16
|
+
description:
|
package/package.json
CHANGED