private void OnItemInit(BaseItem info,ItemOwner obj) { Debug.Log(obj); bool val = info == null; BuyButton.gameObject.SetActive(val); EquipButton.gameObject.SetActive(false); UnEquipButton.gameObject.SetActive(false); UpgradeButton.gameObject.SetActive(false); if (!val) { bool isEquiped = info.IsEquped; if (info.Slot != Slot.executable) { EquipButton.gameObject.SetActive(!isEquiped); UnEquipButton.gameObject.SetActive(isEquiped); var canBeupgraded = canBeUpgraded(info); UpgradeButton.gameObject.SetActive(canBeupgraded); } } SellButton.gameObject.SetActive(!val); ItemInfoElement.gameObject.SetActive(true); }
public ActionResult DeleteConfirmed(int id) { ItemOwner ItemOwner = db.ItemOwner.Find(id); db.Item.Remove(ItemOwner.Item); db.SaveChanges(); return(RedirectToAction("Index")); }
public virtual void OnEquipt(GameObject character) { if (character.CompareTag("Player")) { itemOwner = ItemOwner.Player; } else if (character.CompareTag("Enemy")) { itemOwner = ItemOwner.Enemy; } else { itemOwner = ItemOwner.Other; } ignoredCollider = character.gameObject.GetComponent <Collider>(); Physics.IgnoreCollision(col, ignoredCollider); rigidbodyRef.isKinematic = true; col.isTrigger = true; isEquiped = true; }