From f0d46fb2f12a8da8425330779863884d2bff79db Mon Sep 17 00:00:00 2001 From: realtradam Date: Tue, 26 Jan 2021 01:01:48 -0500 Subject: added proper working rotation --- run.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'run.rb') diff --git a/run.rb b/run.rb index 5149f89..163a3ff 100644 --- a/run.rb +++ b/run.rb @@ -146,16 +146,15 @@ update do @squares.each do |square| square.update(Camera.camera_position, Camera.zoom_level) end - @quad.x += 1 + @quad.rotate(50 - @quad.x,50 - @quad.y,5) @quad.color = 'random' if @frame.zero? # Alternating between follow and manual control - puts @player.x - puts @player.y if @is_follow Camera.follow @player else Camera.move_by(@cam_x_move, @cam_y_move) end + @player.rotate(@player.x1, @player.y1, 5) # This function will teleport the camera directory to those coordinates # It is used by Camera.follow but you can use it yourself too! -- cgit v1.2.3