public static void InvokeStartItems(GameObject player, RoleType roleType, ref List <ItemType> startingItems) { if (StartItemsEvent == null) { return; } StartItemsEvent ev = new StartItemsEvent() { Player = player.GetPlayer(), Role = roleType, StartItems = startingItems }; StartItemsEvent.InvokeSafely(ev); startingItems = ev.StartItems; }
public static void InvokeStartItems(GameObject obj, RoleType id, ref List <ItemType> startItems) { StartItems sT = StartItemsEvent; if (sT == null) { return; } StartItemsEvent ev = new StartItemsEvent() { Player = Player.GetPlayer(obj), Role = id, StartItems = startItems }; sT?.Invoke(ev); startItems = ev.StartItems; }