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; }
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; }
public static Vector2 ToVector2(Size size) { return (Vector2)size; }
// 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; }
public BackgroundMusic(Vector2 location, Size dimensions, SoundEffect soundEffect) { this.Location = location; this.Dimensions = dimensions; this.SoundEffect = soundEffect; }