IDrawable GetNewTexture(AutoTile.PartType partType, Vector2I position, float xOffset = 0F, float yOffset = 0F) { IDrawable texture = GetNewTexture(partType); texture.Position = (position.ToVector2() + new SFML.Window.Vector2f(xOffset, yOffset)) * GameData.TILE_SIZE; return texture; }
public AutoTile(AutoTile copy) : this(new Texture(copy.BaseTexture)) { }
public void SetBase(Texture baseTexture, int width = DEFAULT_WIDTH, int height = DEFAULT_HEIGHT, int highness = DEFAULT_HIGHNESS) { BaseTexture = baseTexture; AutoTile = new AutoTile(BaseTexture); WallAutoTile = new AutoTile(BaseTexture, true); Width = width; Height = height; Highness = highness; GroundTextures = new IDrawable[Height, Width]; WallTextures = new IDrawable[Highness, Width]; Build(); }