Refactor props handling and inventory logic; add ghost prop preview

This commit is contained in:
2026-03-28 23:07:42 +00:00
parent 9b0d29555b
commit 1fbd12e6f6
10 changed files with 138 additions and 49 deletions
+1 -5
View File
@@ -1,11 +1,7 @@
require_relative "base"
class Chest < Prop
def initialize(x, y)
super(x, y)
@frames_count = 1
@spritesheet = Gosu::Image.load_tiles("assets/images/chest.png", 20, 20, retro: true)
end
setup_sprites("assets/images/chest.png", 1)
def resources
{ wood: rand(0..64), metal: rand(0..16), science: rand(0..4) }