public Icon(string iconFileName, int x, int y, int w, int h) : base() { var tex = IoManager.LoadTexture(iconFileName); this.sprite = new Sprite(tex); this.sprite.TextureRect = new IntRect(x, y, w, h); this.size = new Vector2f(w, h); }
public Icon(string iconFileName, IntRect sprite) : base() { var tex = IoManager.LoadTexture(iconFileName); this.sprite = new Sprite(tex); this.sprite.TextureRect = sprite; this.size = new Vector2f(sprite.Width, sprite.Height); }
public void SetTilemask(int gridWidth, int gridHeight, int cellWidth, int cellHeight, string texture) { this.refCellSize.X = cellWidth; this.refCellSize.Y = cellHeight; this.cellSize.X = (int)(cellWidth * this.TileScale); this.cellSize.Y = (int)(cellHeight * this.TileScale); this.GridWidth = gridWidth; this.GridHeight = gridHeight; maskMap = new _Tile[gridHeight, gridWidth]; this.tileset = IoManager.LoadTexture(texture); this.AdjustLayer(); }
override public void SetBackground(string texture) { if (texture == "") { this.DrawBackground = false; this.bgSprite = new Sprite(); } else { this.bgTexture = IoManager.LoadTexture(texture, true); this.bgSprite = new Sprite(this.bgTexture); this.DrawBackground = true; this.AdjustLayer(); } }
public void SetLightTexture(string texture, int u, int v, int w, int h) { this.lightTexture = IoManager.LoadTexture(texture); //TODO }
/// <summary> /// Sets the background. /// </summary> /// <param name="texture">The file name of the texture.</param> virtual public void SetBackground(string texture) { this.bgTexture = IoManager.LoadTexture(texture, true); this.bgSprite = new Sprite(this.bgTexture); this.AdjustLayer(); }