public Ship(SolitudeScreen s) { screen = s; toKill = new List<SolitudeObject>(); roomStatus = new int[Settings.maxShipRows, Settings.maxShipColumns]; random = new Random(); //create the world, player, and boundaries PhysicalWorld = new World(Vector2.Zero); Player = new Player(new Vector2(900f, 830f), PhysicalWorld); border.Add(new Wall(new Vector2(192, 540), PhysicalWorld, 32, 1080, 1f, WallType.Smooth, Direction.Left)); border.Add(new Wall(new Vector2(960, 108), PhysicalWorld, 1920, 64, 1f, WallType.Smooth, Direction.Left)); border.Add(new Wall(new Vector2(1727, 540), PhysicalWorld, 32, 1080, 1f, WallType.Smooth, Direction.Left)); border.Add(new Wall(new Vector2(960, 971), PhysicalWorld, 1920, 32, 1f, WallType.Smooth, Direction.Left)); //term = new Terminal(new Vector2(500, 500), PhysicalWorld, "Derp Derp Derp Derp Derp Dfffffffferp Desdfrp Derp Derp Dffffferp Derp Derp Deffffffffffrp Derp Derp Deffrp Derp Derp Derp Derp"); foreach (Wall j in border){ PhysicalWorld.AddBody(j.body); } contents = new List<SolitudeObject>(); }
public void Reset() { bossFight = false; //get rid of last rooms objects foreach (SolitudeObject o in contents) { PhysicalWorld.RemoveBody(o.body); } PhysicalWorld.RemoveBody(Player.body); PhysicalWorld.Step(.1f); contents.Clear(); toKill.Clear(); bombCount = 0; //Player.Reset(); Player = new Player(new Vector2(900, 830), PhysicalWorld); r = 5; c = 5; //load the first room List<ObjectListItem> read; read = Serializer.DeserializeFile<List<ObjectListItem>>(GameElements.GameWorld.content.RootDirectory + @"/Solitude/Rooms/room-5-5.xml"); CreateObjects(read); }