Small changes

This commit is contained in:
Oliver Rümpelein 2014-09-29 09:34:28 +02:00
parent 6ffc64580c
commit 86aa0887d9
2 changed files with 10 additions and 2 deletions

View file

@ -1 +1,4 @@
Simply game-helper for Dungeonslayers, written in HTML5 and JS Simply game-helper for Dungeonslayers, written in HTML5 and JS.
All links are given from src-root, which makes it possible to run everything with some basic
HTTP-Server from this directory (i.e. 'python -m SimpleHTTPServer' or 'python -m http.server')

View file

@ -77,7 +77,8 @@
(this.hit("coll")[0].overlap) ); (this.hit("coll")[0].overlap) );
} }
}); });
calc_center();
/* Mouse-actions: /* Mouse-actions:
* left click: select creature, save old position, make only this creature * left click: select creature, save old position, make only this creature
* controllable by mouse, write output info * controllable by mouse, write output info
@ -108,6 +109,10 @@
}); });
return this; return this;
},
calc_center: function() {
this.cx = this.x + (this.w / 2);
this.cy = this.y + (this.h / 2);
} }
} }
); );