Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Ausgang = (function () {
- 'use strict';
- function Class(game, map) {
- _.extend(this, new AbstractImage(game, map));
- // set properties
- this.className = 'Ausgang';
- this.imageName = 'ausgang';
- this.imagePath = 'assets/images/images/Ausgang.png';
- }
- // public api
- Class.prototype = {
- preload: preload,
- init: init
- }
- _.extend(Class.prototype, AbstractImage.prototype);
- return Class;
- // private methods
- function preload() {
- this.gameReference.load.image(
- this.imageName,
- this.imagePath,
- ImageConstants.SIZE,
- ImageConstants.SIZE
- );
- //this.game.physics.arcade.enable(this.Ausgang);
- }
- function init(tile) {
- // set position vars
- this.initialTile = tile;
- // add sprite
- this.image = this.gameReference.add.image(
- this.getTileX(5),
- this.getTileY(5),
- //Ursprung
- //this.getTileX(this.initialTile.x),
- //this.getTileY(this.initialTile.y),
- this.imageName,
- );
- // set anchor
- this.image.anchor.setTo(0.5,0.5);
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement