Skip to content

Commit f42bcdc

Browse files
committed
misc: full null game objects in GleUnits
1 parent 685bd17 commit f42bcdc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Runtime/Gamelogic/VisualScriptingGamelogicEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void OnInit(Player player, TableApi tableApi, BallManager ballManager)
6161
_player = player;
6262
BallManager = ballManager;
6363

64-
OnStarted?.Invoke(this, EventArgs.Empty);
64+
EventBus.Trigger(VisualScriptingEventNames.GleStartedEvent, EventArgs.Empty);
6565
}
6666

6767
public void Switch(string id, bool isClosed)

Runtime/Nodes/GleUnit.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ public abstract class GleUnit : Unit, IGleUnit
3535

3636
[DoNotSerialize]
3737
protected Player Player;
38-
38+
3939
protected bool AssertGle(Flow flow)
4040
{
41-
if (Gle != null) {
41+
if (!UnityObjectUtility.IsUnityNull(Gle)) {
4242
return true;
4343
}
4444
Gle = flow.stack.gameObject.GetComponentInParent<IGamelogicEngine>();
@@ -47,7 +47,7 @@ protected bool AssertGle(Flow flow)
4747

4848
protected bool AssertPlayer(Flow flow)
4949
{
50-
if (Player != null) {
50+
if (!UnityObjectUtility.IsUnityNull(Player)) {
5151
return true;
5252
}
5353
Player = flow.stack.gameObject.GetComponentInParent<Player>();

0 commit comments

Comments
 (0)