public static void InvokeSyncData(GameObject player, ref int currentAnimation, ref Vector2 speed, ref bool allow) { if (SyncDataEvent == null) { return; } SyncDataEvent ev = new SyncDataEvent { Player = player.GetPlayer(), State = currentAnimation, v2 = speed, Allow = allow }; SyncDataEvent.InvokeSafely(ev); allow = ev.Allow; }
public static void InvokeSyncData(GameObject player, ref int state, ref Vector2 v2, ref bool allow) { SyncData syncdata = SyncDataEvent; if (syncdata == null) { return; } SyncDataEvent ev = new SyncDataEvent { Player = Player.GetPlayer(player), State = state, v2 = v2, Allow = allow }; syncdata.Invoke(ref ev); allow = ev.Allow; }