Skip to content

Commit b3e2516

Browse files
committed
fix: Reveal event API
1 parent 74a111e commit b3e2516

File tree

12 files changed

+22
-14
lines changed

12 files changed

+22
-14
lines changed

Assets/JCSUnity/Scripts/Actions/3D/AI/JCS_3DWalkAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ private void Awake()
165165

166166
this.mAdjustTimeTrigger = this.GetComponent<JCS_AdjustTimeTrigger>();
167167

168-
mAdjustTimeTrigger.actions = DoAI;
168+
mAdjustTimeTrigger.onAction = DoAI;
169169

170170
this.mStartingPosition = this.transform.position;
171171
}

Assets/JCSUnity/Scripts/Actions/JCS_AdjustTimeTrigger.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class JCS_AdjustTimeTrigger : MonoBehaviour
2020
/* Variables */
2121

2222
// action to trigger if the time is reached.
23-
public EmptyFunction actions = null;
23+
public EmptyFunction onAction = null;
2424

2525
[Separator("Check Variables (JCS_AdjustTimeTrigger)")]
2626

@@ -62,15 +62,15 @@ public class JCS_AdjustTimeTrigger : MonoBehaviour
6262

6363
[Tooltip("Event that will be triggered.")]
6464
[SerializeField]
65-
private UnityEvent mUnityEvents = null;
65+
private UnityEvent mOnAction = null;
6666

6767
/* Setter & Getter */
6868

6969
public bool Active { get { return this.mActive; } set { this.mActive = value; } }
7070
public float TimeZone { get { return this.mTimeZone; } set { this.mTimeZone = value; } }
7171
public float AdjustTimeZone { get { return this.mAdjustTimeZone; } set { this.mAdjustTimeZone = value; } }
7272
public JCS_DeltaTimeType DeltaTimeType { get { return this.mDeltaTimeType; } set { this.mDeltaTimeType = value; } }
73-
public UnityEvent UnityEvents { get { return this.mUnityEvents; } set { this.mUnityEvents = value; } }
73+
public UnityEvent OnAction { get { return this.mOnAction; } set { this.mOnAction = value; } }
7474

7575
/* Functions */
7676

@@ -109,11 +109,11 @@ private void DoAction()
109109
return;
110110

111111
// active actions.
112-
if (actions != null)
113-
actions.Invoke();
112+
if (onAction != null)
113+
onAction.Invoke();
114114

115-
if (mUnityEvents != null)
116-
mUnityEvents.Invoke();
115+
if (mOnAction != null)
116+
mOnAction.Invoke();
117117

118118
mDidAction = true;
119119
}

Assets/JCSUnity/Scripts/Actions/JCS_RandomTweenerAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ private void Awake()
5353
this.mAdjustTimeTrigger = this.GetComponent<JCS_AdjustTimeTrigger>();
5454

5555
// set effect function pointer.
56-
this.mAdjustTimeTrigger.actions = TargetNewVectorValue;
56+
this.mAdjustTimeTrigger.onAction = TargetNewVectorValue;
5757
}
5858

5959
/// <summary>

Assets/JCSUnity/Scripts/Actions/Pathfinding/JCS_SimplePathAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private void Awake()
6262
this.mLookAtAction = this.GetComponent<JCS_3DLookAtAction>();
6363
this.mAdjustTimerTrigger = this.GetComponent<JCS_AdjustTimeTrigger>();
6464

65-
this.mAdjustTimerTrigger.actions = DoPath;
65+
this.mAdjustTimerTrigger.onAction = DoPath;
6666

6767
#if UNITY_EDITOR
6868
if (mPoints.Count == 0)

Assets/JCSUnity/Scripts/Actions/Pathfinding/JCS_TweenPathAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private void Awake()
6262
JCS_Debug.LogWarning("Path action with 0 path point is not valid");
6363
#endif
6464

65-
mAdjustTimerTrigger.actions = DoPath;
65+
mAdjustTimerTrigger.onAction = DoPath;
6666
}
6767

6868
/// <summary>

Assets/JCSUnity/Scripts/Animation/2D/JCS_2DRandAnimByTimeController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ private void Awake()
3333
this.m2DAnimator = this.GetComponent<JCS_2DAnimator>();
3434
this.mAdjustTimeTrigger = this.GetComponent<JCS_AdjustTimeTrigger>();
3535

36-
this.mAdjustTimeTrigger.actions = RandomPlayAnimationInAnimator;
36+
this.mAdjustTimeTrigger.onAction = RandomPlayAnimationInAnimator;
3737
}
3838

3939
/// <summary>

Assets/JCSUnity/Scripts/GameObject/2D/JCS_2DLight.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private void Awake()
5555
this.mAlphaObject = this.GetComponent<JCS_AlphaObject>();
5656
this.mAdjustTimeTrigger = this.GetComponent<JCS_AdjustTimeTrigger>();
5757

58-
this.mAdjustTimeTrigger.actions = DoFade;
58+
this.mAdjustTimeTrigger.onAction = DoFade;
5959
}
6060

6161
/// <summary>

Assets/JCSUnity/Scripts/GameObject/3D/JCS_3DLight.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private void Awake()
6161
this.mValueTweener.set_float = SetLight_Range;
6262
this.mValueTweener.get_float = GetLight_Range;
6363

64-
this.mAdjustTimerTrigger.actions = DoRange;
64+
this.mAdjustTimerTrigger.onAction = DoRange;
6565
}
6666

6767
private void SetLight_Range(float newVal) { this.mLight.range = newVal; }

Assets/JCSUnity/Scripts/UI/Button/System/JCS_ActionButton.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public class JCS_ActionButton : JCS_Button
2929

3030
/* Setter & Getter */
3131

32+
public UnityEvent OnAction { get { return this.mOnAction; } set { this.mOnAction = value; } }
33+
3234
/* Functions */
3335

3436
/// <summary>

Assets/JCSUnity/Scripts/UI/Button/System/JCS_ActionGamePadButton.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public class JCS_ActionGamePadButton : JCS_GamepadButton
2929

3030
/* Setter & Getter */
3131

32+
public UnityEvent OnAction { get { return this.mOnAction; } set { this.mOnAction = value; } }
33+
3234
/* Functions */
3335

3436
/// <summary>

0 commit comments

Comments
 (0)