summaryrefslogtreecommitdiffhomepage
path: root/run.rb
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2021-01-23 02:17:59 -0500
committerrealtradam <[email protected]>2021-01-23 02:17:59 -0500
commitb3c67e70aa97c6ad6176917427b5a192b407dbd6 (patch)
treed7cd7ead527aacb10528a40207f05dc8ae095778 /run.rb
parent641546c18cdca5ef783dc237104aff3f89724714 (diff)
downloadruby2d-camera-b3c67e70aa97c6ad6176917427b5a192b407dbd6.tar.gz
ruby2d-camera-b3c67e70aa97c6ad6176917427b5a192b407dbd6.zip
reworking to work with quads
Diffstat (limited to 'run.rb')
-rw-r--r--run.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/run.rb b/run.rb
index 8cdb51d..87d430a 100644
--- a/run.rb
+++ b/run.rb
@@ -119,6 +119,11 @@ on :key do |event|
Camera.zoom_to 1
end
end
+@quad = Quad.new(x1: 100, y1: 100,
+ x2: 120, y2: 100,
+ x3: 120, y3: 120,
+ x4: 100, y4: 120)
+Camera << @quad
update do
@player.x += @x_move
@@ -138,7 +143,7 @@ update do
# Alternating between follow and manual control
if @is_follow
- Camera.follow @player
+ #Camera.follow @player
else
Camera.move_by(@cam_x_move, @cam_y_move)
end