Simplified InputMapper#action

This commit is contained in:
2019-08-13 10:23:08 -05:00
parent 7ebf65f535
commit 6669687278
2 changed files with 2 additions and 8 deletions

View File

@@ -84,17 +84,12 @@ class IMICFPS
def self.action(key)
answer = nil
@@keymap.each do |action, value|
@@keymap.detect do |action, value|
if value.is_a?(Array)
if value.include?(key)
answer = action
break
end
answer = action if value.include?(key)
else
if value == key
answer = action
break
end
end
end

View File

@@ -163,7 +163,6 @@ class IMICFPS
def toggle_first_person_view
@first_person_view = !@first_person_view
@visible = !@first_person_view
puts "First Person? #{@first_person_view}"
end
def turn_180