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); }
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; }
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)); }