class Physicist::Laboratory::View

Public Instance Methods

app_screen() click to toggle source
# File lib/physicist/laboratory/view.rb, line 4
def app_screen
  Screen.new(
    scientist: scientist_view,
    map_grid: application.workspace_view.grid_map,
    camera: camera_location
  )
end
camera_location() click to toggle source
# File lib/physicist/laboratory/view.rb, line 20
def camera_location
  cx, cy = *scientist_view.current.position
  mx, my = (window.width / 2) / tile_size, (window.height / 2) / tile_size
  [ cx - mx, cy - my ]
end
scientist_view() click to toggle source
# File lib/physicist/laboratory/view.rb, line 12
def scientist_view
  application.scientist_view
end
tile_size() click to toggle source
# File lib/physicist/laboratory/view.rb, line 16
def tile_size
  64
end