mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 15:42:35 +00:00
Simplified InputMapper#action
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user