예제 #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)
 {
 }