public void setup() { Player subby; subby = new Player() { Fuel = 1000, Speed = 0, AngleDegrees = 0, Position = new Vector2(0, 0), Bullits = 10, Health = 1000 }; level = new Level(); level.Subby = subby; levelboundaries = new LevelBoundaries() { Bottom = 200, Left = 10, Right = 200, Top = 10 }; level.LevelBoundaries = levelboundaries; level.ScrollingPosition = 0; wrak = new Wrak(); wrak.Damage = 1; wrak.Position = new Vector2(0, 0); }
private void DeserializeLevel(string filePath) { using (FileStream reader = new FileStream(filePath, FileMode.Open, FileAccess.Read)) { DataContractSerializer ser = new DataContractSerializer(typeof(Level)); level = (Level)ser.ReadObject(reader); } }
public void setup() { missile = new Missile() { Damage = 300, Active = true, Speed = 3f, Exploded = false, Position = new Vector2(0, 0) }; chopper = new Chopper() { Health = 300, Speed = 2f, Position = new Vector2 (20,20) }; level = new Level(); }