Esempio n. 1
0
		public LNAtlasNode(string fsName, int tileWidth, int tileHeight) {
			try {
				this._itemWidth = tileWidth;
				this._itemHeight = tileHeight;
				LTexture texture = LNDataCache.GetFrameStruct(fsName)._texture;
				this._itemsPerRow = texture.GetWidth() / tileWidth;
				this._itemsPerColumn = texture.GetHeight() / tileHeight;
				this._textureAtlas = new LNTextureAtlas(texture, this._itemsPerRow
						* this._itemsPerColumn);
			} catch (Exception) {
				throw new Exception(
						"LNAtlasNode Exception in the data load : " + fsName);
			}
		}
Esempio n. 2
0
 public LNAtlasNode(string fsName, int tileWidth, int tileHeight)
 {
     try {
         this._itemWidth  = tileWidth;
         this._itemHeight = tileHeight;
         LTexture texture = LNDataCache.GetFrameStruct(fsName)._texture;
         this._itemsPerRow    = texture.GetWidth() / tileWidth;
         this._itemsPerColumn = texture.GetHeight() / tileHeight;
         this._textureAtlas   = new LNTextureAtlas(texture, this._itemsPerRow
                                                   * this._itemsPerColumn);
     } catch (Exception) {
         throw new Exception(
                   "LNAtlasNode Exception in the data load : " + fsName);
     }
 }