Skip to content

Commit

Permalink
🔧 Small fixes to DelayedEvt module & assemblies
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMCarter committed Oct 24, 2024
1 parent 256aabb commit 5e8b8ab
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:70913f3dbaf500447ac3cab07477430f",
"GUID:f9eb8297e33d3b14ea4786f5a0c2ac04",
"GUID:d4f8f3098ca064117a9b67941bfedd91",
"GUID:6d41763603f56404492cef226e63cb07"
],
"includePlatforms": [],
Expand All @@ -15,12 +14,6 @@
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [
{
"name": "com.unity.remote-config",
"expression": "",
"define": "UNITY_REMOTECONFIG"
}
],
"versionDefines": [],
"noEngineReferences": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public sealed class DelayedEvt : EvtBase
/// <param name="unscaledTime">Should the event be tied to unscaled time? Def: True</param>
public void Raise(float seconds, bool unscaledTime = true)
{
RuntimeTimerStandard.SetCountdown(seconds, RaiseAction, unscaledTime);
RuntimeTimer.Set(seconds, RaiseAction, unscaledTime);
}
}

Expand All @@ -65,7 +65,7 @@ public sealed class DelayedEvt<T> : EvtBase<T>
/// <param name="unscaledTime">Should the event be tied to unscaled time? Def: True</param>
public void Raise(float seconds, T param, bool unscaledTime = true)
{
RuntimeTimerStandard.SetCountdown(seconds, () => RaiseAction(param), unscaledTime);
RuntimeTimer.Set(seconds, () => RaiseAction(param), unscaledTime);
}
}

Expand All @@ -87,7 +87,7 @@ public sealed class DelayedEvt<T1,T2> : EvtBase<T1,T2>
/// <param name="unscaledTime">Should the event be tied to unscaled time? Def: True</param>
public void Raise(float seconds, T1 param, T2 param2, bool unscaledTime = true)
{
RuntimeTimerStandard.SetCountdown(seconds, () => RaiseAction(param, param2), unscaledTime);
RuntimeTimer.Set(seconds, () => RaiseAction(param, param2), unscaledTime);
}
}

Expand All @@ -110,7 +110,7 @@ public sealed class DelayedEvt<T1,T2,T3> : EvtBase<T1,T2,T3>
/// <param name="unscaledTime">Should the event be tied to unscaled time? Def: True</param>
public void Raise(float seconds, T1 param, T2 param2, T3 param3, bool unscaledTime = true)
{
RuntimeTimerStandard.SetCountdown(seconds, () => RaiseAction(param, param2, param3), unscaledTime);
RuntimeTimer.Set(seconds, () => RaiseAction(param, param2, param3), unscaledTime);
}
}

Expand All @@ -134,7 +134,7 @@ public sealed class DelayedEvt<T1,T2,T3,T4> : EvtBase<T1,T2,T3,T4>
/// <param name="unscaledTime">Should the event be tied to unscaled time? Def: True</param>
public void Raise(float seconds, T1 param, T2 param2, T3 param3, T4 param4, bool unscaledTime = true)
{
RuntimeTimerStandard.SetCountdown(seconds, () => RaiseAction(param, param2, param3, param4), unscaledTime);
RuntimeTimer.Set(seconds, () => RaiseAction(param, param2, param3, param4), unscaledTime);
}
}

Expand All @@ -159,7 +159,7 @@ public sealed class DelayedEvt<T1,T2,T3,T4,T5> : EvtBase<T1,T2,T3,T4,T5>
/// <param name="unscaledTime">Should the event be tied to unscaled time? Def: True</param>
public void Raise(float seconds, T1 param, T2 param2, T3 param3, T4 param4, T5 param5, bool unscaledTime = true)
{
RuntimeTimerStandard.SetCountdown(seconds, () => RaiseAction(param, param2, param3, param4, param5), unscaledTime);
RuntimeTimer.Set(seconds, () => RaiseAction(param, param2, param3, param4, param5), unscaledTime);
}
}

Expand All @@ -185,7 +185,7 @@ public sealed class DelayedEvt<T1,T2,T3,T4,T5,T6> : EvtBase<T1,T2,T3,T4,T5,T6>
/// <param name="unscaledTime">Should the event be tied to unscaled time? Def: True</param>
public void Raise(float seconds, T1 param, T2 param2, T3 param3, T4 param4, T5 param5, T6 param6, bool unscaledTime = true)
{
RuntimeTimerStandard.SetCountdown(seconds, () => RaiseAction(param, param2, param3, param4, param5, param6), unscaledTime);
RuntimeTimer.Set(seconds, () => RaiseAction(param, param2, param3, param4, param5, param6), unscaledTime);
}
}

Expand All @@ -212,7 +212,7 @@ public sealed class DelayedEvt<T1,T2,T3,T4,T5,T6,T7> : EvtBase<T1,T2,T3,T4,T5,T6
/// <param name="unscaledTime">Should the event be tied to unscaled time? Def: True</param>
public void Raise(float seconds, T1 param, T2 param2, T3 param3, T4 param4, T5 param5, T6 param6, T7 param7, bool unscaledTime = true)
{
RuntimeTimerStandard.SetCountdown(seconds, () => RaiseAction(param, param2, param3, param4, param5, param6, param7), unscaledTime);
RuntimeTimer.Set(seconds, () => RaiseAction(param, param2, param3, param4, param5, param6, param7), unscaledTime);
}
}

Expand Down Expand Up @@ -240,7 +240,7 @@ public sealed class DelayedEvt<T1,T2,T3,T4,T5,T6,T7,T8> : EvtBase<T1,T2,T3,T4,T5
/// <param name="unscaledTime">Should the event be tied to unscaled time? Def: True</param>
public void Raise(float seconds, T1 param, T2 param2, T3 param3, T4 param4, T5 param5, T6 param6, T7 param7, T8 param8, bool unscaledTime = true)
{
RuntimeTimerStandard.SetCountdown(seconds, () => RaiseAction(param, param2, param3, param4, param5, param6, param7, param8), unscaledTime);
RuntimeTimer.Set(seconds, () => RaiseAction(param, param2, param3, param4, param5, param6, param7, param8), unscaledTime);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ private void OnValidate()
{
// Sets the default language if one is not defined.
if (!string.IsNullOrEmpty(currentLanguage.DisplayName) && !string.IsNullOrEmpty(currentLanguage.Code)) return;
if (DataAccess.GetAsset<DataAssetDefinedLanguages>() == null) return;
if (DataAccess.GetAsset<DataAssetDefinedLanguages>().Languages.Count <= 0) return;
currentLanguage = DataAccess.GetAsset<DataAssetDefinedLanguages>().Languages[0];
}
Expand Down

0 comments on commit 5e8b8ab

Please sign in to comment.