2024-12-13 20:50:18 +08:00
|
|
|
/*
|
|
|
|
|
文件名:Item.nut
|
|
|
|
|
路径:User/Asset/Item/Item.nut
|
|
|
|
|
创建日期:2024-12-13 12:30
|
|
|
|
|
文件用途:项目类
|
|
|
|
|
*/
|
|
|
|
|
GameItem <- {};
|
|
|
|
|
class GameItem.Item {
|
|
|
|
|
|
2025-01-19 09:48:40 +08:00
|
|
|
function _typeof() {
|
|
|
|
|
return "Item";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取信息窗口
|
|
|
|
|
function GetInfoWindow() {
|
|
|
|
|
if (typeof this == "Equipment") {
|
|
|
|
|
return GameItem.EquipmentInfo(this);
|
|
|
|
|
} else if (typeof this == "Stackable") {
|
|
|
|
|
return GameItem.StackableInfo(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
error("GameItem::Info:: 未知物品类型");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取图标精灵
|
|
|
|
|
function GetIconSprite() {
|
|
|
|
|
if (typeof this == "Equipment") {
|
|
|
|
|
return GameItem.EquipmentIcon(this);
|
|
|
|
|
} else if (typeof this == "Stackable") {
|
|
|
|
|
return GameItem.StackableIcon(this);
|
|
|
|
|
}
|
|
|
|
|
error("GameItem::Icon:: 未知物品类型");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2024-12-13 20:50:18 +08:00
|
|
|
}
|