pull/1/head
E. Almqvist 3 years ago
parent 3df0d9ace4
commit 35754c120e
  1. 30
      app.rb
  2. 2
      controller.rb

@ -54,21 +54,21 @@ class Window < Gosu::Window
end
end
# def button_up?(id)
# super id
#
# if( @controller != nil && @controller.class == Player ) then
# @controller.button_up?(id)
# end
# end
#
# def button_down?(id)
# super id
#
# if( @controller != nil && @controller.class == Player ) then
# @controller.button_down?(id)
# end
# end
def button_up?(id)
super id
if( @controller != nil && @controller.class == Player ) then
@controller.button_up?(id)
end
end
def button_down?(id)
super id
if( @controller != nil && @controller.class == Player ) then
@controller.button_down?(id)
end
end
def update
if( !@freeze ) then

@ -16,7 +16,7 @@ class Player < PhysCube
def tick
super
if( @engine && !self.world.freeze ) then
if( @engine ) then
self.vel += self.get_angle_vec * @thrust
end
end

Loading…
Cancel
Save