diff options
| author | realtradam <[email protected]> | 2021-01-23 02:17:59 -0500 |
|---|---|---|
| committer | realtradam <[email protected]> | 2021-01-23 02:17:59 -0500 |
| commit | b3c67e70aa97c6ad6176917427b5a192b407dbd6 (patch) | |
| tree | d7cd7ead527aacb10528a40207f05dc8ae095778 /run.rb | |
| parent | 641546c18cdca5ef783dc237104aff3f89724714 (diff) | |
| download | ruby2d-camera-old-b3c67e70aa97c6ad6176917427b5a192b407dbd6.tar.gz ruby2d-camera-old-b3c67e70aa97c6ad6176917427b5a192b407dbd6.zip | |
reworking to work with quads
Diffstat (limited to 'run.rb')
| -rw-r--r-- | run.rb | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |
