1234567891011121314151617181920212223 |
- function Destination(startx, starty) {
- var position = {x : startx, y: starty};
- this.init = function(canvas) {
- };
- this.update = function(canvas) {
- };
- this.draw = function(context, offset) {
- context.beginPath();
- context.strokeStyle = "#000000";
- context.rect(position.x - 5, position.y - 5, 10, 10);
- context.stroke();
- };
- this.getPosition = function() {
- return position;
- }
- this.visit = function(hero) {
- hero.addCoin();
- }
- }
|