mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-15 15:52:34 +00:00
Added last 2 units, added sidebar actions and build queue components, entities can now have their build actions put on the sidebar
This commit is contained in:
14
lib/components/build_queue.rb
Normal file
14
lib/components/build_queue.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class IMICRTS
|
||||
class BuildQueue < Component
|
||||
Item = Struct.new(:entity, :progress)
|
||||
def initialize(parent:)
|
||||
@parent = parent
|
||||
|
||||
@queue = []
|
||||
end
|
||||
|
||||
def add(type)
|
||||
@queue << Item.new(Entity.get(type), 0.0)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user