//------------------------------------------------------------------------------------------------- // public methods //------------------------------------------------------------------------------------------------- public void populate(Entity ent) { //populate the inventory for the Entity //EntityAction ent_act = (EntityAction)ent; EntityAction ent_act = ent as EntityAction; if (!ent_act) { mText.text = "No Inventory"; return; } mActer = ent_act; mText.text = ent_act.printInventory(); //should the equip button be shown? if (ent_act.hasEquipItem()) { //show the button mEquipMenuButton.gameObject.SetActive(true); } else { mEquipMenuButton.gameObject.SetActive(false); } }