Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var AbstractImage = (function () {
- 'use strict';
- function Class(game, map) {
- // references
- this.gameReference = game;
- this.mapReference = map;
- this.className = 'AbstractImage';
- // properties
- this.image = null;
- this.imageName = null;
- this.imagePath = null;
- }
- // public api
- Class.prototype = {
- // tile management methods
- getTileX: getTileX,
- getTileY: getTileY
- };
- return Class;
- // private methods
- function getTileX(tileXId) {
- return (ImageConstants.Anchor.X * ImageConstants.SIZE) + (tileXId * ImageConstants.SIZE);
- }
- function getTileY(tileYId) {
- return (ImageConstants.Anchor.Y * ImageConstants.SIZE) + (tileYId * ImageConstants.SIZE);
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement