Beispiel #1
0
        //internal void CountAdrenaline(UsedMedicalItemEventArgs ev)
        //{
        //    foreach (Pickup item in Object.FindObjectsOfType<Pickup>())
        //    {
        //        if (item.ItemId.ToString() == "Adrenaline")
        //        {
        //            Log.Info("id: " + item.ItemId + "\nname: " + item.name);
        //        }

        //    }
        //}

        internal void UsedAdrenaline(UsedMedicalItemEventArgs item)
        {
            if (item.Item.ToString() == "Adrenaline")
            {
                UsedItem usedItem = new UsedItem(item);
                if (!usedFind(item))
                {
                    usedItems.Add(usedItem);
                    coroutines.Add(Timing.RunCoroutine(SetPlayerScale(item), "ScaleThread"));
                }
            }
        }
Beispiel #2
0
        private bool usedFind(UsedMedicalItemEventArgs item)
        {
            UsedItem temp = new UsedItem(item);
            string   name = item.Player.Nickname;

            foreach (UsedItem t in usedItems)
            {
                if (temp.Equals(t))
                {
                    return(true);
                }
            }
            return(false);
        }
Beispiel #3
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            UsedItem temp = (UsedItem)obj;

            if (item.Player.Id == temp.item.Player.Id && status == temp.status)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }