Replaced usage of with CommonMethods.window (which uses ), refactored InputMapper to match actions to keys and visa-versa, removed categories from InputMapper, moved input mappings from Camera and Player into InputMapper (for now.)

This commit is contained in:
2019-02-22 14:55:06 -06:00
parent 8b65973f6f
commit 6191699d8b
11 changed files with 178 additions and 121 deletions

View File

@@ -1,4 +1,5 @@
class Text
include IMICFPS::CommonMethods
CACHE = {}
attr_accessor :text, :x, :y, :z, :size, :factor_x, :factor_y, :color, :shadow, :shadow_size, :options
@@ -29,9 +30,9 @@ class Text
when :left
@x = 0+BUTTON_PADDING
when :center
@x = ($window.width/2)-(@textobject.text_width(@text)/2)
@x = (window.width/2)-(@textobject.text_width(@text)/2)
when :right
@x = $window.width-BUTTON_PADDING-@textobject.text_width(@text)
@x = window.width-BUTTON_PADDING-@textobject.text_width(@text)
end
end