Class: Physicist::Laboratory::View
- Inherits:
-
Dedalus::ApplicationView
- Object
- Dedalus::ApplicationView
- Physicist::Laboratory::View
- Defined in:
- lib/physicist/laboratory/view.rb
Instance Method Summary collapse
Instance Method Details
#app_screen ⇒ Object
4 5 6 7 8 9 10 |
# 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 ⇒ Object
20 21 22 23 24 |
# 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 ⇒ Object
12 13 14 |
# File 'lib/physicist/laboratory/view.rb', line 12 def scientist_view application.scientist_view end |
#tile_size ⇒ Object
16 17 18 |
# File 'lib/physicist/laboratory/view.rb', line 16 def tile_size 64 end |