public bool Equals(PartnerOfferHistoryResponse input) { if (input == null) { return(false); } return (( PartnerOfferKey == input.PartnerOfferKey || (PartnerOfferKey != null && PartnerOfferKey.Equals(input.PartnerOfferKey)) ) && ( MembershipId == input.MembershipId || (MembershipId.Equals(input.MembershipId)) ) && ( MembershipType == input.MembershipType || (MembershipType.Equals(input.MembershipType)) ) && ( LocalizedName == input.LocalizedName || (LocalizedName != null && LocalizedName.Equals(input.LocalizedName)) ) && ( LocalizedDescription == input.LocalizedDescription || (LocalizedDescription != null && LocalizedDescription.Equals(input.LocalizedDescription)) ) && ( IsConsumable == input.IsConsumable || (IsConsumable != null && IsConsumable.Equals(input.IsConsumable)) ) && ( QuantityApplied == input.QuantityApplied || (QuantityApplied.Equals(input.QuantityApplied)) ) && ( ApplyDate == input.ApplyDate || (ApplyDate != null && ApplyDate.Equals(input.ApplyDate)) )); }
public void OnCollisionEnter2D(Collision2D other) { foreach (string s in TouchTypes) { if (other.gameObject.GetComponent(s)) { // pass reference to this, to consumable if this is consumable // ie. consume item immediately after pickup IsConsumable cons = GetComponent <IsConsumable>(); if (cons) { cons.SetRecipient(other.gameObject); } // stote in Player's inventory IsInventoriable inv = GetComponent <IsInventoriable>(); if (inv) { inv.SetRecipient(other.gameObject); } // store in item collection ie. gold in coin purse IsCollectible col = GetComponent <IsCollectible>(); if (col) { col.SetRecipient(other.gameObject); } IsPassive pas = GetComponent <IsPassive>(); if (pas) { pas.SetRecipient(other.gameObject); } // sendmessage if we actually find a component who can listen for this SendMessage(OnTouchCB); } } }