2024-02-17 16:31:03 +01:00
|
|
|
class_name Item extends Node
|
|
|
|
|
|
|
|
var Name : String = "none"
|
|
|
|
|
|
|
|
var Icon : Sprite2D
|
2024-02-20 12:03:16 +01:00
|
|
|
|
|
|
|
var mixed_self : Item
|
|
|
|
|
|
|
|
func _init(name:String , icon_texture : Texture2D, mixed_self : Item = null):
|
|
|
|
Name = name
|
|
|
|
Icon.texture = icon_texture
|
|
|
|
if Mixed_Item[Name] != null :
|
|
|
|
mixed_self = Mixed_Item[Name]
|
|
|
|
add_child(Icon)
|
|
|
|
|
|
|
|
|
|
|
|
static var Base_Item = [
|
|
|
|
Item.new("Apple", preload("res://GraphicalAssets/Sprite/IMG_0156.PNG")),
|
|
|
|
]
|
|
|
|
|
|
|
|
static var Cooked_Item = {
|
|
|
|
|
|
|
|
}
|
|
|
|
static var Mixed_Item = {
|
|
|
|
"Apple" = Item.new("Apple_Juice", preload("res://GraphicalAssets/Sprite/Apple_Juice.tres")),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static var Cutted_Item = {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|