Permalink
Browse files

In the process of implementing vertical scrolling. WIP.

  • Loading branch information...
1 parent d9a67f7 commit 5ba55cbbc96141e39869edb0b4589a3c4505c7b6 @joshuarwynn committed May 2, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 Engine.js
View
@@ -2,6 +2,9 @@
var width = 800;
var height = 600;
+//shapes
+var scrollY = 0;
+
function init() {
canvas = document.getElementById('canvas');
ctx = canvas.getContext('2d');
@@ -27,7 +30,8 @@ function drawShapes() {
var startX = -100;
var startY = 0;
var x = startX;
- var y = startY;
+ //var y = startY;
+ var y = scrollY;
var row = 0;
//9 shapes per row x 6 rows == 63
@@ -53,6 +57,9 @@ function drawShapes() {
y = startY;
}
}
+
+ scrollY += 1;
+ //console.log(scrollY);
}
window.onload = init;

0 comments on commit 5ba55cb

Please sign in to comment.