//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")); } } }
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); }
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); } }