File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Assets/JCSUnity/Scripts/Actions Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,12 @@ public class JCS_AdjustTimeTrigger : MonoBehaviour
2323 // Action to trigger if the time is reached.
2424 public Action onAction = null ;
2525
26+ // Execution before action is being executed.
27+ public Action onBeforeAction = null ;
28+
29+ // Execution after action is being executed.
30+ public Action onAfterAction = null ;
31+
2632 [ Separator ( "Check Variables (JCS_AdjustTimeTrigger)" ) ]
2733
2834 [ Tooltip ( @"Time to record down the real time to do one action after
@@ -161,9 +167,13 @@ private void DoAction()
161167 /// </summary>
162168 private void ExecuteAction ( )
163169 {
170+ onBeforeAction ? . Invoke ( ) ;
171+
164172 onAction ? . Invoke ( ) ;
165173
166174 mOnAction ? . Invoke ( ) ;
175+
176+ onAfterAction ? . Invoke ( ) ;
167177 }
168178 }
169179}
You can’t perform that action at this time.
0 commit comments