您最多选择25个主题
主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
21 行
383 B
21 行
383 B
mod weapon;
|
|
mod tool;
|
|
mod armor;
|
|
|
|
use crate::entity::item::ItemDetail;
|
|
|
|
pub trait ShopItem {
|
|
fn price(&self) -> usize;
|
|
fn as_bytes(&self) -> [u8; 12];
|
|
fn as_item(&self) -> ItemDetail;
|
|
}
|
|
|
|
pub enum ShopType {
|
|
Weapon,
|
|
Tool,
|
|
Armor
|
|
}
|
|
|
|
pub use weapon::{WeaponShop, WeaponShopItem};
|
|
pub use tool::{ToolShop, ToolShopItem};
|
|
pub use armor::{ArmorShop, ArmorShopItem};
|