mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-16 00:02:33 +00:00
Updates to support changes to CyberarmEngine
This commit is contained in:
@@ -14,7 +14,7 @@ class IMICRTS
|
||||
|
||||
@entities = []
|
||||
@orders = []
|
||||
@camera = Camera.new(viewport: [0, 0, $window.width, $window.height])
|
||||
@camera = Camera.new
|
||||
@last_camera_position = @camera.position.clone
|
||||
@camera_moved = true
|
||||
@camera_move_threshold = 5
|
||||
@@ -27,7 +27,10 @@ class IMICRTS
|
||||
@camera_moved = (@last_camera_position - @camera.position.clone).sum > @camera_move_threshold
|
||||
@last_camera_position = @camera.position.clone
|
||||
|
||||
@entities.each { |ent| ent.tick(tick_id); @visiblity_map.update(ent) }
|
||||
@entities.each do |ent|
|
||||
ent.tick(tick_id)
|
||||
@visiblity_map.update(ent)
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@@ -58,4 +61,4 @@ class IMICRTS
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user