public OverworldEditor(ContentManager Content, Overworld map) { this.Content = Content; this.map = map; this.cursor = new OverworldCursor(Content); ui = new UiSystem(); ui.addStripeElement(new UiTexture(Content, "owhotkeys"), StripePosition.Left); ui.addStripeElement(new UiObjectMonitor <Cursor>(this.cursor, (cursor) => { return(cursor.getLocation().ToString()); }), StripePosition.Right); }
public WorldEditor(ContentManager Content, World world) { this.Content = Content; this.world = world; cursor = new Cursor(Content); ui = new UiSystem(); ui.addStripeElement(new UiTexture(Content, "editorhotkeys"), StripePosition.Left); ui.addStripeElement(new UiObjectMonitor <Cursor>(cursor, (cursor) => { return(cursor.getTileLocation().ToString()); }), StripePosition.Right); this.camera = world.camera; this.camera.setCenteringEntity(cursor); }
public GameEditor(Game1 game, ContentManager Content, TitleScreen titleScreen) { this.game = game; this.Content = Content; this.titleScreen = titleScreen; ui = new UiSystem(true); ui.addStripeElement(new UiTexture(Content, "gmhotkeys"), StripePosition.Left); }
public Overworld(ContentManager Content, Game1 game, Player p, string current = null) { this.game = game; this.Content = Content; ui = new UiSystem(); player = new OWPlayer(Content, p, Vector2.Zero); // load map overworldLua = new Lua(); overworldLua.LoadCLRPackage(); overworldLua.DoString("import ('Lakeside2', 'Lakeside2')"); overworldLua["player"] = p; overworldLua["overworld"] = this; LuaScript locationScript = new LuaScript("map.lua"); locationScript.execute(null, overworldLua); // put player in the correct spot (the area they're coming out of) if (current == null) { index = 0; } else { for (int i = 0; i < locations.Count; i++) { if (locations[i].filename == current) { index = i; break; } } } // physically move player to index, set camera setPlayerLocation(); x = getCameraDesired(); ui.addStripeElement(new UiObjectMonitor <List <OWLocation> >(locations, locs => { return(Path.GetFileNameWithoutExtension(locs[index].filename)); }), StripePosition.Center); }