模板脚本文件

This commit is contained in:
2026-09-12 22:18:23 +08:00
parent 2816092fb4
commit d3f1058d79
32 changed files with 3200 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
class_name Item
extends Resource
enum ItemType { WEAPON, CONSUMABLE, TOOL, MISC, HAT, BACKPACK }
enum ItemRarity { COMMON, UNCOMMON, RARE, EPIC, LEGENDARY }
enum ContextOptions {
DROP,
EQUIP,
UNEQUIP,
}
@export var id: String = ""
@export var name: String = ""
@export var description: String = ""
@export var icon: Texture2D
@export var stackable: bool = true
@export var max_stack: int = 99
@export var item_type: ItemType = ItemType.MISC
@export var rarity: ItemRarity = ItemRarity.COMMON
@export var value: int = 0
@export var context_options: Array[Item.ContextOptions] = []
@export var scene_path: String = ""