public TileMap(Field2D field, int tileWidth, int tileHeight, int mWidth, int mHeight) { this.field = field; this.maxWidth = mWidth; this.maxHeight = mHeight; this.offset = new Vector2f(0, 0); this.imgPack = new LTexturePack(); this.lastOffsetX = -1; this.lastOffsetY = -1; this.active = true; this.dirty = true; this.visible = true; }
public void SetImagePack(string file) { if (imgPack != null) { imgPack.Dispose(); imgPack = null; } this.active = false; this.dirty = true; imgPack = new LTexturePack(file); imgPack.Packed(); }