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:
@@ -12,10 +12,13 @@ class IMICRTS
|
||||
@hash[key.to_sym] = value
|
||||
end
|
||||
|
||||
def method_missing(method)
|
||||
def method_missing(method, argument = nil)
|
||||
if value = @hash.dig(method)
|
||||
value
|
||||
elsif argument != nil
|
||||
@hash[method.to_s.sub("=", "").to_sym] = argument
|
||||
else
|
||||
return false unless argument # May result in bugginess!
|
||||
raise "Unknown value for: #{method}"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user