Advertisement
XArnonX

ausgang

Feb 16th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var Ausgang = (function () {
  2.  
  3.   'use strict';
  4.  
  5.  
  6.   function Class(game, map) {
  7.  
  8.     _.extend(this, new AbstractImage(game, map));
  9.  
  10.     // set properties
  11.     this.className = 'Ausgang';
  12.     this.imageName = 'ausgang';
  13.     this.imagePath = 'assets/images/images/Ausgang.png';
  14.   }
  15.  
  16.  
  17.   // public api
  18.   Class.prototype = {
  19.     preload: preload,
  20.     init: init
  21.   }
  22.  
  23. _.extend(Class.prototype, AbstractImage.prototype);
  24.  
  25.   return Class;
  26.  
  27.  
  28.   // private methods
  29.   function preload() {
  30.     this.gameReference.load.image(
  31.       this.imageName,
  32.       this.imagePath,
  33.       ImageConstants.SIZE,
  34.       ImageConstants.SIZE
  35.     );
  36.     //this.game.physics.arcade.enable(this.Ausgang);
  37.   }
  38.  
  39.   function init(tile) {
  40.     // set position vars
  41.     this.initialTile = tile;
  42.  
  43.     // add sprite
  44.     this.image = this.gameReference.add.image(
  45.       this.getTileX(5),
  46.       this.getTileY(5),
  47.       //Ursprung
  48.       //this.getTileX(this.initialTile.x),
  49.       //this.getTileY(this.initialTile.y),
  50.       this.imageName,
  51.     );
  52.  
  53.     // set anchor
  54.     this.image.anchor.setTo(0.5,0.5);
  55.   }
  56.  
  57.  
  58. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement