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,9 +1,10 @@
# frozen_string_literal: true
class IMICFPS
class EventHandler
class EntityLifeCycle < EventHandler
def handles
[:create, :move, :destroy]
%i[create move destroy]
end
def handle(subscriber, context, *args)

View File

@@ -1,4 +1,5 @@
# frozen_string_literal: true
class IMICFPS
class EventHandler
class EntityMoved < EventHandler
@@ -6,11 +7,11 @@ class IMICFPS
[:entity_moved]
end
def handle(subscriber, context, *args)
def handle(subscriber, _context, *args)
event = EventHandler::Event.new(entity: args.first.first)
subscriber.trigger(event)
end
end
end
end
end

View File

@@ -1,9 +1,10 @@
# frozen_string_literal: true
class IMICFPS
class EventHandler
class Input < EventHandler
def handles
[:button_down, :button_up]
%i[button_down button_up]
end
def handle(subscriber, context, *args)
@@ -14,12 +15,10 @@ class IMICFPS
if action.is_a?(Numeric) && action == key
subscriber.trigger(event)
else
if InputMapper.get(action) == key
subscriber.trigger(event)
end
elsif InputMapper.get(action) == key
subscriber.trigger(event)
end
end
end
end
end
end