Moved godot files into a directory to keep things clean

This commit is contained in:
2025-11-05 15:35:08 +11:00
parent cb85608dfe
commit 9f48ca5ee0
28 changed files with 12 additions and 6 deletions

View File

@@ -0,0 +1,24 @@
#Inventory Singleton
extends Node
#game items
@abstract
class Item:
var name: String
func _init(_name: String):
name = _name
class Wood extends Item:
func _init():
super("Wood")
class Stone extends Item:
func _init():
super("Stone")
#inventory controls
var _inventory_contents: Array[Item] = []
func add_item(item: Item) -> void:
_inventory_contents.push_back(item)
print("Inventory: ", _inventory_contents.map(func (i: Item) -> String: return i.name))