Fixed map editor state crashing

This commit is contained in:
2020-12-14 16:04:12 -06:00
parent 5ebcc56c33
commit f04217ccc7
2 changed files with 3 additions and 4 deletions

View File

@@ -10,7 +10,8 @@ class IMICFPS
# in to a Scene or Scene3D container object
# and refactor Game to use it.
Publisher.new
@map = Map.new(map_parser: @options[:map_parser])
window.director.load_map(map_parser: @options[:map_parser])
@map = window.director.map
@camera = PerspectiveCamera.new(position: Vector.new, aspect_ratio: window.aspect_ratio)
@editor = IMICFPS::Editor.new(manifest: Manifest.new(package: "base", name: "editor"))
@camera_controller = CameraController.new(camera: @camera, entity: @editor)
@@ -37,7 +38,7 @@ class IMICFPS
end
def control_editor
InputMapper.each_key do |key, pressed|
InputMapper.keys.each do |key, pressed|
next unless pressed
actions = InputMapper.actions(key)

View File

@@ -79,8 +79,6 @@ class IMICFPS
end
def draw_cursor
size = 16
@cursor.draw(mouse_x, mouse_y, Float::INFINITY)
end