本文整理汇总了C#中Item.getDescription方法的典型用法代码示例。如果您正苦于以下问题:C# Item.getDescription方法的具体用法?C# Item.getDescription怎么用?C# Item.getDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Item
的用法示例。
在下文中一共展示了Item.getDescription方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: drawHoverBox
public GameObject drawHoverBox(Item theItem)
{
GameObject aHoverBox = ourGWM.createObject("UI/HoverWindow");
aHoverBox.name = "HoverWindow";
aHoverBox.transform.SetParent(GameObject.Find("UICanvas").transform);
aHoverBox.transform.position = Input.mousePosition + new Vector3(-95, 51);
aHoverBox.transform.FindChild("Name").gameObject.GetComponent<Text>().text = theItem.getName();
aHoverBox.transform.FindChild("Description").gameObject.GetComponent<Text>().text = theItem.getDescription();
return aHoverBox;
}
示例2: drawItemHoverTooltip
protected void drawItemHoverTooltip(Item item){
GUI.Box (new Rect(item.position.x - width + slotWidth, item.position.y + slotHeight, width, height), item.getDescription() + priceMessage + item.getPrice(), centeredStyle);
}
示例3: retrieveDescritpion
protected string retrieveDescritpion(Item item){
return item.getDescription();
}
示例4: showDescription
public void showDescription (Item item) {
this.item = item;
nameValue.text = item.getName();
stat_2.text = "";
if (item is ArmorModifier) {
stat_1.text = "Защита=> " + ((ArmorModifier)item).getArmor().ToString();
} else if (item is WeaponItem) {
stat_1.text = ((WeaponItem)item).getDamage().ToString() + " " + ((WeaponItem)item).getWeaponType().getSpeedType().getSpeedName();
// stat_2.text = "Урон=> " + ((WeaponItem)item).getDamage().ToString();
// stat_1.text = "Скорость=> " + ((WeaponItem)item).getWeaponType().getAttackSpeed().ToString();
} else if (item is PotionItem) {
stat_1.text = ((PotionItem)item).getPotionType().getEffectDescript();
} else if (item is MaterialItem) {
stat_1.text = "";
}
if (stat_2.text.Equals("")) {
body.localPosition = bodyPosStat_1;
description.transform.localPosition = descriptPos_1;
} else {
body.localPosition = bodyPosStat_2;
description.transform.localPosition = descriptPos_2;
}
if (item.getItemQuality() != ItemQuality.COMMON) {
qualityValue.text = item.getItemQuality().getDescription();
qualityValue.color = item.getItemQuality().getColor();
quality.gameObject.SetActive(true);
} else {
quality.gameObject.SetActive(false);
}
description.text = item.getDescription();
costText.text = item.getCost().ToString();
stretchBody();
setActionMsg(item.getHolder());
onScreen = true;
Update();
gameObject.SetActive(true);
}