Example #1
0
 public Player(Vector2 position, float scale, Texture2D texture, float rotation, float transparency, PlayField field) : base(position, scale, texture, rotation, transparency, field)
 {
     this.Position     = position;
     this.Scale        = scale;
     this.Rotation     = rotation;
     this.Texture      = texture;
     this.Transparency = transparency;
     children          = new List <Sprite>();
     field.Addtoplayfield(this);
 }
Example #2
0
 public Sprite(Vector2 position, float scale, Texture2D texture, SoundEffectInstance soundEffect, float rotation, float transparency, PlayField field)
 {
     this.position     = position;
     this.scale        = scale;
     this.rotation     = rotation;
     this.texture      = texture;
     this.transparency = transparency;
     children          = new List <Sprite>();
     field.Addtoplayfield(this);
     this.soundEffectInstance = soundEffect;
 }
Example #3
0
 public PhysicsObject(Vector2 position, float scale, Texture2D texture, float rotation, float transparency, PlayField field) : base(position, scale, texture, rotation, transparency, field)
 {
     this.Position     = position;
     this.Scale        = scale;
     this.Rotation     = rotation;
     this.Texture      = texture;
     this.Transparency = transparency;
     this.Ground       = ground;
     children          = new List <Sprite>();
     field.Addtoplayfield(this);
     hitbox = new Rectangle((int)position.X, (int)position.Y, (int)Math.Ceiling(texture.Width * scale), (int)Math.Ceiling(texture.Height * scale));
 }