mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 23:52:35 +00:00
Ran rubocop autocorrect
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative "asset_viewer/lib/main_menu"
|
||||
require_relative "asset_viewer/lib/turn_table"
|
||||
require_relative "asset_viewer/lib/turn_table"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class IMICFPS
|
||||
class AssetViewerTool
|
||||
class MainMenu < Menu
|
||||
@@ -6,17 +7,17 @@ class IMICFPS
|
||||
window.needs_cursor = true
|
||||
|
||||
@manifests = []
|
||||
Dir.glob(GAME_ROOT_PATH + "/assets/**/manifest.yaml").each do |manifest|
|
||||
Dir.glob("#{GAME_ROOT_PATH}/assets/**/manifest.yaml").each do |manifest|
|
||||
begin
|
||||
@manifests << Manifest.new(manifest_file: manifest)
|
||||
rescue
|
||||
rescue StandardError
|
||||
warn "Broken manifest: #{manifest}"
|
||||
end
|
||||
end
|
||||
|
||||
@manifests.sort_by! { |m| m.name.downcase }
|
||||
|
||||
label "#{IMICFPS::NAME}", text_size: 100, color: Gosu::Color::BLACK
|
||||
label IMICFPS::NAME.to_s, text_size: 100, color: Gosu::Color::BLACK
|
||||
label "Asset Viewer", text_size: 50
|
||||
|
||||
flow(width: 1.0, height: 1.0) do
|
||||
@@ -45,4 +46,4 @@ class IMICFPS
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class IMICFPS
|
||||
class AssetViewerTool
|
||||
class TurnTable < CyberarmEngine::GuiState
|
||||
include LightManager
|
||||
|
||||
attr_reader :map
|
||||
|
||||
def setup
|
||||
window.needs_cursor = false
|
||||
@manifest = @options[:manifest]
|
||||
@@ -42,7 +44,7 @@ class IMICFPS
|
||||
0, 0, color_top,
|
||||
window.width, 0, color_top,
|
||||
window.width, window.height, color_bottom,
|
||||
0, window.height, color_bottom,
|
||||
0, window.height, color_bottom
|
||||
)
|
||||
|
||||
Gosu.gl do
|
||||
@@ -83,9 +85,10 @@ class IMICFPS
|
||||
include EntityManager
|
||||
|
||||
attr_reader :entities
|
||||
|
||||
def initialize
|
||||
@entities = []
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative "map_editor/lib/main_menu"
|
||||
require_relative "map_editor/lib/editor"
|
||||
require_relative "map_editor/lib/editor"
|
||||
|
||||
@@ -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