fr.jeanf.eventsystem 0.1.113 → 0.1.114

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.
@@ -36,16 +36,20 @@ namespace jeanf.EventSystem
36
36
  [Tooltip("If you want to do more than just turning triggering play/stop on the timeline")]
37
37
  public TimelineBoolEvent OnEventRaised;
38
38
 
39
+ [SerializeField] private BoolEventChannelSO generalPauseEvent;
40
+
39
41
  private void OnEnable()
40
42
  {
41
43
  if (_channel != null)
42
44
  _channel.OnEventRaised += Respond;
45
+ if (generalPauseEvent) generalPauseEvent.OnEventRaised += Pause;
43
46
  }
44
47
 
45
48
  private void OnDisable()
46
49
  {
47
50
  if (_channel != null)
48
51
  _channel.OnEventRaised -= Respond;
52
+ if (generalPauseEvent) generalPauseEvent.OnEventRaised -= Pause;
49
53
  }
50
54
 
51
55
  private void Respond(PlayableAsset timeline, bool value)
@@ -63,5 +67,17 @@ namespace jeanf.EventSystem
63
67
  }
64
68
  if(isDebug) Debug.Log($" timeline-bool event raised: <{timeline},{value}>");
65
69
  }
70
+
71
+ private void Pause(bool state)
72
+ {
73
+ if (state)
74
+ {
75
+ _playableDirectorToControl.Pause();
76
+ }
77
+ else
78
+ {
79
+ _playableDirectorToControl.Play();
80
+ }
81
+ }
66
82
  }
67
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fr.jeanf.eventsystem",
3
- "version": "0.1.113",
3
+ "version": "0.1.114",
4
4
  "displayName": "Event System",
5
5
  "description": "This package contains a basic Event System based on Scriptable Objects as communication medium",
6
6
  "unity": "2021.3",