Small changes
This commit is contained in:
parent
6ffc64580c
commit
86aa0887d9
2 changed files with 10 additions and 2 deletions
|
@ -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')
|
|
@ -77,6 +77,7 @@
|
||||||
(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
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue