Skip to content

Commit c64a115

Browse files
committed
feat: add exec
1 parent e605c4e commit c64a115

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Assets/JCSUnity/Scripts/Actions/JCS_AdjustTimeTrigger.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)