mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-15 15:52:34 +00:00
Added building component, refactored components to have setup, draw, update and tick methods, added fencing for building construction area parimeter, misc other changes.
This commit is contained in:
@@ -15,6 +15,33 @@ class IMICRTS
|
||||
@@components[name] = klass
|
||||
end
|
||||
end
|
||||
|
||||
attr_reader :parent
|
||||
def initialize(parent:)
|
||||
@parent = parent
|
||||
|
||||
setup
|
||||
end
|
||||
|
||||
def data
|
||||
@parent.data
|
||||
end
|
||||
|
||||
def data=(key, value)
|
||||
@parent.data[key] = value
|
||||
end
|
||||
|
||||
def setup
|
||||
end
|
||||
|
||||
def draw
|
||||
end
|
||||
|
||||
def update
|
||||
end
|
||||
|
||||
def tick(tick_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user