mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-16 00:02:33 +00:00
added on_order handler to entities and components, added visibility map
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
class IMICRTS
|
||||
class Camera
|
||||
attr_reader :viewport, :position, :velocity, :zoom, :drag
|
||||
|
||||
def initialize(viewport:, scroll_speed: 10, position: CyberarmEngine::Vector.new(0.0, 0.0))
|
||||
@viewport = CyberarmEngine::BoundingBox.new(viewport[0], viewport[1], viewport[2], viewport[3])
|
||||
@scroll_speed = scroll_speed
|
||||
@@ -15,7 +16,9 @@ class IMICRTS
|
||||
@grab_drag = 0.5 # Used when camera is panned using middle mouse button
|
||||
end
|
||||
|
||||
def window; $window; end
|
||||
def window;
|
||||
$window;
|
||||
end
|
||||
|
||||
def draw(&block)
|
||||
if block
|
||||
|
||||
Reference in New Issue
Block a user