public override void Begin() { base.Begin(); Background = new Background("Sprites/Spritesheets/tile_spritesheet_0.png", "Maps/bg_map_scene1"); Add(Background); ObjectMap objectMap = new ObjectMap("Sprites/Spritesheets/tile_spritesheet_0.png", "Maps/object_map_scene1"); Add(objectMap); Door door = new Door(new Vector2(5 * 16, 11 * 16), 16, 16, new Nazarek()); Add(door); Add(Game1.Player); EverythingRenderer er = new EverythingRenderer(); Camera = new PlayerCamera(640, 360, Engine.Width * 1 / 3, Engine.Height * 1 / 3); Camera.Position = new Vector2(Game1.Player.Position.X - Engine.Width / 2, Game1.Player.Position.Y - Engine.Height / 2); er.Camera = Camera; Add(er); Vector2 newScreenCenter = Camera.ScreenToCamera(new Vector2(Engine.Width / 2, Engine.Height / 2)); PlayerCameraStaticBound camDebug = new PlayerCameraStaticBound(newScreenCenter, Engine.Width * 1 / 3, Engine.Height * 1 / 3); Add(camDebug); NPC aisya = Game1.NPCDict["Aisya"]; aisya.Position = new Vector2(5 * 16, 3 * 16); Add(aisya); }
public override void Begin() { base.Begin(); Background = new Background("Sprites/Spritesheets/tile_spritesheet_0.png", "Maps/nazarek_map"); Add(Background); House house1 = new House(1, new Vector2(4 * 16, 2 * 16)); Add(house1); House house0 = new House(0, new Vector2(21 * 16, 2 * 16)); Add(house0); Door door0 = new Door(new Vector2(house0.X + 16, house0.Y + 16 * 4), 16, 16); door0.Add(new CoDialogue("LOCKED001DOOR")); door0.Locked = true; Add(door0); Door door1 = new Door(new Vector2(house1.X + 30, house1.Y + 62), 21, 17, new Scene1()); Add(door1); Door southExit = new Door(new Vector2(13 * 16, 29 * 16), 4 * 16, 2 * 16, new NazarekSouth()); Add(southExit); Add(Game1.Player); EverythingRenderer er = new EverythingRenderer(); Camera = new PlayerCamera(640, 360, Engine.Width * 1 / 3, Engine.Height * 1 / 3); Camera.Position = new Vector2(Game1.Player.Position.X - Engine.Width / 2, Game1.Player.Position.Y - Engine.Height / 2); er.Camera = Camera; Add(er); Vector2 newScreenCenter = Camera.ScreenToCamera(new Vector2(Engine.Width / 2, Engine.Height / 2)); PlayerCameraStaticBound camDebug = new PlayerCameraStaticBound(newScreenCenter, Engine.Width * 1 / 3, Engine.Height * 1 / 3); Add(camDebug); Monsters monster = new Zaletos(new Vector2(14 * 16 - 8, 14 * 16 - 8)); Add(monster); }
public override void Begin() { base.Begin(); if (!Game1.NazSouthIntro) { Game1.Player.Position = new Vector2(9 * 16, 12 * 16); Game1.GameDialogue = new CoDialogue("NAZSOUTH001INTRO", OnComplete); Game1.GameDialogue.StartDialogue(); } // background Background = new Background("Sprites/Spritesheets/tile_spritesheet_0.png", "Maps/nazarek_south_map"); Add(Background); ObjectMap objectMap = new ObjectMap("Sprites/Spritesheets/tile_spritesheet_0.png", "Maps/nazarek_south_object_map"); Add(objectMap); // player Add(Game1.Player); // renderer EverythingRenderer er = new EverythingRenderer(); Camera = new PlayerCamera(640, 360, Engine.Width * 1 / 3, Engine.Height * 1 / 3); Camera.Position = new Vector2(Game1.Player.Position.X - Engine.Width / 2, Game1.Player.Position.Y - Engine.Height / 2); er.Camera = Camera; Add(er); // objects Entity sign = new Entity(new Vector2(6 * 16, 2 * 16)); sign.Collider = new Hitbox(16, 16); sign.Add(new CoDialogue("NAZSOUTH001SIGN")); Add(sign); // exits Door northExit = new Door(new Vector2(5 * 16, -8), 128, 16, new Nazarek()); Add(northExit); }