mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-17 08:32:35 +00:00
Ran rubocop autocorrect
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user