public void Load(Texture2D texture, int tileSize) { var maxX = texture.Width / tileSize; var maxY = texture.Height / tileSize - 1; var info = new TileSource(texture); this.cache = info.Load(tileSize); }
public Tile(string name, TileSource tileSource, Rectangle sourceRect, Rectangle collisionBox, CollisionType collisionType) { this.Name = name; this.tileSource = tileSource; this.sourceRect = sourceRect; this.Size = new Vector2(sourceRect.Width, sourceRect.Height); this.CollisionBox = collisionBox; this.CollisionType = collisionType; }