コード例 #1
0
        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;
        }
コード例 #2
0
ファイル: PlayerEvents.cs プロジェクト: Killers0992/EXILED
        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;
        }