public ScriptHandler(Maps newmap, Player newplayer, Itemhandler newitems, Game1 newgame = null) { activescript = new Script("null"); map = newmap; player = newplayer; items = newitems; game = newgame; IFstack = new List<bool>(); }
private void InitializeContent() { map = new Maps(); if (FirstRoom != "") { string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); path = path.Substring(6, path.Length - 6); // Getting rid of the file:\ it puts in front of the path with the above line string relPath = System.IO.Path.Combine(path + "\\saves\\", FirstRoom); LoadMap(relPath, true); } else { //Test-Walkmaps map.AddWalkRect(new Rectangle(174, 101, 271, 183)); map.AddWalkRect(new Rectangle(174, 258, 71, 149)); } player = new Player(); items = new Itemhandler(); GameVariables = new List<String[]>(); proj = new Project(Projectname, GameVariables, items.ReturnItemList()); save = new Savegame(proj.GetGlobalVariables(), player.InvList, map); LoadProjectfile(); Editor = new Form1(this); NewWalkMap = new Rectangle(0, 0, 0, 0); Snapshots = new List<Snapshot>(); }