Пример #1
0
 public SimpleSprite(Texture2D texture)
     : this()
 {
     Texture = texture;
     Origin = Texture.Center();
     _texHeight = texture.Height;
     _texWidth = texture.Width;
 }
Пример #2
0
 public void DrawCentered(Texture2D texture, Vector2 position, Rectangle? sourceRectangle, Color color, float rotation, Vector2 scale, SpriteEffects spriteEffects, float layerDepth)
 {
     this.DrawInner(texture, position, sourceRectangle, color, rotation, texture.Center(), scale, spriteEffects, layerDepth);
 }
Пример #3
0
 public void DrawCentered(Texture2D texture, Vector2 position, Color color, float rotation, Vector2 scale)
 {
     this.DrawInner(texture, position, null, color, rotation, texture.Center(), scale, SpriteEffects.None, 0f);
 }
Пример #4
0
 public void DrawCentered(Texture2D texture, Vector2 position, Rectangle? sourceRectangle, Color color)
 {
     this.DrawInner(texture, position, sourceRectangle, color, 0f, texture.Center(), Vector2.One, SpriteEffects.None, 0f);
 }
Пример #5
0
 public void DrawCentered(Texture2D texture, Vector2 position, Color color)
 {
     this.DrawInner(texture, position, null, color, 0f, texture.Center(), Vector2.One, SpriteEffects.None, 0f);
 }