diff --git a/lib/entities/power_plant.rb b/lib/entities/buildings/power_plant.rb similarity index 100% rename from lib/entities/power_plant.rb rename to lib/entities/buildings/power_plant.rb diff --git a/lib/entities/construction_worker.rb b/lib/entities/units/construction_worker.rb similarity index 100% rename from lib/entities/construction_worker.rb rename to lib/entities/units/construction_worker.rb diff --git a/lib/entities/harvester.rb b/lib/entities/units/harvester.rb similarity index 100% rename from lib/entities/harvester.rb rename to lib/entities/units/harvester.rb diff --git a/lib/entities/tank.rb b/lib/entities/units/tank.rb similarity index 100% rename from lib/entities/tank.rb rename to lib/entities/units/tank.rb diff --git a/lib/entity.rb b/lib/entity.rb index ffc13b6..56b66bb 100644 --- a/lib/entity.rb +++ b/lib/entity.rb @@ -139,6 +139,6 @@ class IMICRTS end end -Dir.glob("#{IMICRTS::GAME_ROOT_PATH}/lib/entities/*.rb").each do |entity| +Dir.glob("#{IMICRTS::GAME_ROOT_PATH}/lib/entities/**/*.rb").each do |entity| require_relative entity end \ No newline at end of file diff --git a/lib/states/game.rb b/lib/states/game.rb index 5aafb63..3cc0621 100644 --- a/lib/states/game.rb +++ b/lib/states/game.rb @@ -15,8 +15,8 @@ class IMICRTS label "SIDEBAR", text_size: 78, margin_bottom: 20 - flow do - @buttons = stack(width: 75) do + flow(width: 1.0) do + @buttons = stack(width: 0.9) do @h = button("Harvester", width: 1.0) do @player.entities << Entity.new( name: :harvester, @@ -49,7 +49,8 @@ class IMICRTS end end - stack(width: 0.25, height: 1.0) do + # Power meter + stack(width: 0.1, height: 1.0, align: :bottom) do background Gosu::Color::GREEN end end