Esempio n. 1
0
 public GameSprite(Texture2D spriteSheet, Size frameSize, string spriteName)
 {
     this.SpriteSheet = spriteSheet;
     this.FrameSize = frameSize;
     this.animations = new Dictionary<string, SpriteAnimation>((int)(this.SpriteSheet.Height / this.FrameSize.Height));
     this.Offset = Vector2.Zero;
     this.SpriteName = spriteName;
 }
Esempio n. 2
0
 public Backdrop(Vector2 location, Size dimensions, float depth, Texture2D texture)
 {
     this.Location = location;
     this.Dimensions = dimensions;
     this.Depth = depth;
     this.Texture = texture;
     this.Scale = new Vector2(this.Dimensions.Width / (float)this.Texture.Width, this.Dimensions.Height / (float)this.Texture.Height);
     this.TileToBounds = false;
 }
Esempio n. 3
0
 public static Vector2 ToVector2(Size size)
 {
     return (Vector2)size;
 }
Esempio n. 4
0
 // for now, just holds the width and height of the viewport.
 // may in the future interact with the graphcis device or attempt to get viewport information based on the game or the screen
 public Viewport(Size viewportSize)
 {
     this.ViewportSize = viewportSize;
 }
Esempio n. 5
0
 public BackgroundMusic(Vector2 location, Size dimensions, SoundEffect soundEffect)
 {
     this.Location = location;
     this.Dimensions = dimensions;
     this.SoundEffect = soundEffect;
 }