Ran rubocop autocorrect

This commit is contained in:
2020-12-02 17:37:48 -06:00
parent aa30ff73d0
commit 95bea199ed
116 changed files with 758 additions and 575 deletions

View File

@@ -1,4 +1,5 @@
# frozen_string_literal: true
class IMICFPS
class MapEditorTool
class Editor < CyberarmEngine::GuiState
@@ -10,8 +11,8 @@ class IMICFPS
# and refactor Game to use it.
Publisher.new
@map = Map.new(map_parser: @options[:map_parser])
@camera = PerspectiveCamera.new( position: Vector.new, aspect_ratio: window.aspect_ratio )
@editor = IMICFPS::Editor.new( manifest: Manifest.new(package: "base", name: "editor") )
@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)
@crosshair = Crosshair.new
@@ -36,7 +37,7 @@ class IMICFPS
end
def control_editor
InputMapper.keys.each do |key, pressed|
InputMapper.each_key do |key, pressed|
next unless pressed
actions = InputMapper.actions(key)

View File

@@ -1,18 +1,19 @@
# frozen_string_literal: true
class IMICFPS
class MapEditorTool
class MainMenu < Menu
def setup
window.needs_cursor = true
label "#{IMICFPS::NAME}", text_size: 50
label IMICFPS::NAME.to_s, text_size: 50
label "Map Editor", text_size: 28
@maps = []
Dir.glob(GAME_ROOT_PATH + "/maps/*.json").each do |map|
Dir.glob("#{GAME_ROOT_PATH}/maps/*.json").each do |map|
begin
@maps << MapParser.new(map_file: map)
rescue
rescue StandardError
warn "Broken map file: #{map}"
end
end
@@ -48,4 +49,4 @@ class IMICFPS
end
end
end
end
end