From 18091a5d10efd355312fad1712709dd7011e6b4e Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 22 Nov 2021 09:52:16 +0100 Subject: [PATCH] Refactor --- src/app.rb | 2 +- src/lib/controller.rb | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/app.rb b/src/app.rb index db61f15..59c9f5f 100755 --- a/src/app.rb +++ b/src/app.rb @@ -80,7 +80,7 @@ class Window < Gosu::Window @world.physobjs << cube2 @world.physobjs << planet - @world.freeze = true + @world.freeze = false self.mainmenu.show = false end diff --git a/src/lib/controller.rb b/src/lib/controller.rb index a87127e..a36c4c6 100644 --- a/src/lib/controller.rb +++ b/src/lib/controller.rb @@ -5,6 +5,10 @@ class Player < PhysCube @engine = false @thrust = 0.001 + + # Bind all the binds to all the functions stuff + # world.down_keyhook.add() + end private def get_angle_vec @@ -21,12 +25,6 @@ class Player < PhysCube end end - def button_up(id) - end - - def button_up?(id) - end - def button_down(id) case id @@ -49,9 +47,6 @@ class Player < PhysCube end end - def button_down?(id) - end - def inspect return "\nName: #{self.name}\nOrbit of: #{self.parent_orbit.name}\nVel: #{self.vel.magnitude.round(1)} #{self.vel.round(4)}\nAccel: #{self.accel.magnitude.round(4)} #{self.accel.round(4)}\nPos: #{self.pos.round(4)}\nAngle: #{self.angle.round(1)} deg\nEngine: #{self.engine}\nThrust: #{self.thrust}\naccel_vecs: #{self.accel_vecs}\n" end