Пример #1
0
        public Sprite(Texture texture, Vector startingPosition, double width, double height)
        {
            if (width <= 0) width = texture.Width;
            if (height <= 0) height = texture.Height;

            _xPosition = startingPosition.X;
            _yPosition = startingPosition.Y;
            _texture = texture;

            SetScale(width / texture.Width, height / texture.Height);

            InitVertexPositions(new Vector(_xPosition, _yPosition, 0), width, height);
            this.Color = new Color(1, 1, 1, 1);
            SetUVs(new Point(0, 0), new Point(1, 1));
        }
Пример #2
0
 public Font(Texture texture, Dictionary<char, CharacterData> characterData)
 {
     _texture = texture;
     _characterData = characterData;
 }
Пример #3
0
 public Sprite(Texture texture, Vector startingPosition)
     : this(texture, startingPosition, texture.Width, texture.Height)
 {
 }
Пример #4
0
 public Sprite(Texture texture, double width, double height)
     : this(texture, new Vector(0, 0, 0), width, height)
 {
 }
Пример #5
0
 public Sprite(Texture texture)
     : this(texture, new Vector(0, 0, 0), texture.Width, texture.Height)
 {
 }