public SaveLoad(PlayField field, string action) { this.field = field; if (action == "SAVE") { this.InitiateSave(); } else if (action == "LOAD") { this.Load(); } }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); field = new PlayField(); }
public Sprite(Vector2 position, float scale, Texture2D texture, PlayField field) : this(position, scale, texture, 0f, 1f, field) { }
public Sprite(Vector2 position, Texture2D texture, PlayField field) : this(position, 1f, texture, 0f, 1f, field) { }
public Sprite(Vector2 position, float scale, Texture2D texture, float rotation, PlayField field) : this(position, scale, texture, null, rotation, 1f, field) { }
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 Sprite(Texture2D texture, PlayField field) : this(Vector2.Zero, 1f, texture, 0f, 1f, field) { }
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 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)); }