Basic Example: Syntax

This commit is contained in:
MrGadget1024 2021-10-09 09:32:10 -04:00
parent c7a3310b20
commit 2dca328fff

View File

@ -114,9 +114,9 @@ public override void OnStartClient()
playerUI.GetComponent<PlayerUI>().SetPlayer(this, isLocalPlayer); playerUI.GetComponent<PlayerUI>().SetPlayer(this, isLocalPlayer);
// Invoke all event handlers with the current data // Invoke all event handlers with the current data
OnPlayerNumberChanged.Invoke(playerNumber); OnPlayerNumberChanged?.Invoke(playerNumber);
OnPlayerColorChanged.Invoke(playerColor); OnPlayerColorChanged?.Invoke(playerColor);
OnPlayerDataChanged.Invoke(playerData); OnPlayerDataChanged?.Invoke(playerData);
} }
/// <summary> /// <summary>