public void show(MouseOverUI mouse) { this.mouse = mouse; //this.transform.GetChild(1).gameObject.GetComponent<Text>().text = //"Stats \n Watt: " + item.getDamage() + " \n Matt: " + item.getMagicAttack() + " \n Luk: " + item.getLuk() + ""; InventoryInformationString data = displayInfo(); name.text = data.getName(); description.text = data.getDescription(); statsText.text = data.getString(); //this.gameObject.SetActive(true); isShowing = true; this.transform.position = new Vector3(this.mouse.position().x, this.mouse.position().y, 0f); }
private InventoryInformationString displayInfo() { int itemID = item.getID(); ItemVariables info = ItemDataProvider.getInstance().getStats(item.getID()); InventoryInformationString data = new InventoryInformationString(); data.setName(info.getString("name")); data.setDescription(info.getString("description")); if (itemID.isItemType(e_itemTypes.EQUIP)) { data.setString("Stats \n Watt: " + item.getDamage() + " \n Matt: " + item.getMagicAttack() + " \n Luk: " + item.getLuk() + ""); } else { data.addInformation(info); } return(data); }