===================================================================
--- original.js
+++ change.js
@@ -51,11 +51,10 @@
var self = Container.call(this);
var heroGraphics = self.createAsset('hero', 'Hero Graphics', .5, .5);
heroGraphics.scale.set(4);
self.speed = 5;
- self.move = function (dx, dy) {
+ self.move = function (dx) {
self.x += dx * self.speed;
- self.y += dy * self.speed;
};
self.balance = function (block) {
block.y = self.y - self.height - block.height;
block.x = self.x;
@@ -99,9 +98,8 @@
stage.on('move', function (obj) {
var event = obj.event;
var pos = event.getLocalPosition(self);
hero.x = pos.x;
- hero.y = pos.y - hero.height - 200;
});
LK.on('tick', function () {
hero.move();
for (var a = blocks.length - 1; a >= 0; a--) {