private void MakeMonsterRoom3() { Vector2 door1Camera = Room.TileToWorldPos(new Vector2(8.5f, 20.5f)); Vector2 door2Camera = Room.TileToWorldPos(new Vector2(8.5f, 4.5f)); MonsterRoom.CreateStartEvent createStart = (Room room, Player player) => { List<CameraEvent> events = new List<CameraEvent>(); events.Add(new CameraEvent(door1Camera, (Room r, Player p, int time) => { ((Door)room.tiles[8, 20].puzzle).Close(); })); events.Add(new CameraEvent(door2Camera, (Room r, Player p, int time) => { ((Door)room.tiles[8, 4].puzzle).Close(); })); return events; }; Vector2 spawnEnemyCamera = (door1Camera + door2Camera) / 2f; MonsterRoom.CreateEnemiesEvent createEnemies = (Room room, Player player, List<Enemy> enemies) => { Turret turret = new Turret(spawnEnemyCamera); turret.maxShootTimer = 120; enemies.Add(turret); enemies.Add(new Spider(spawnEnemyCamera + Room.TileToWorldPos(-5, 1))); enemies.Add(new Spider(spawnEnemyCamera + Room.TileToWorldPos(5, 1))); FireCaster caster = new FireCaster(spawnEnemyCamera + Room.TileToWorldPos(-2, -4)); caster.maxShootTimer = 120; enemies.Add(caster); caster = new FireCaster(spawnEnemyCamera + Room.TileToWorldPos(2, -4)); caster.maxShootTimer = 120; enemies.Add(caster); }; MonsterRoom.CreateEndEvent createEnd = (Room room, Player player) => { List<CameraEvent> events = new List<CameraEvent>(); events.Add(new CameraEvent(door1Camera, (Room r, Player p, int time) => { ((Door)room.tiles[8, 20].puzzle).Open(); })); events.Add(new CameraEvent(door2Camera, (Room r, Player p, int time) => { ((Door)room.tiles[8, 4].puzzle).Open(); })); return events; }; monsterRoom3 = new MonsterRoom(topRight, createStart, spawnEnemyCamera, createEnemies, createEnd); }
private void MakeTopMonsterRoom() { Vector2 door1Camera = Room.TileToWorldPos(new Vector2(top.width * 0.5f, top.height - 4.5f)); Vector2 door2Camera = Room.TileToWorldPos(new Vector2(top.width * 0.5f, 4.5f)); MonsterRoom.CreateStartEvent createStart = (Room room, Player player) => { List<CameraEvent> events = new List<CameraEvent>(); events.Add(new CameraEvent(door1Camera, (Room r, Player p, int time) => { ((Door)room.tiles[top.width / 2, top.height - 5].puzzle).Close(); })); events.Add(new CameraEvent(door2Camera, (Room r, Player p, int time) => { ((Door)room.tiles[top.width / 2, 4].puzzle).Close(); })); return events; }; Vector2 spawnEnemyCamera = (door1Camera + door2Camera) / 2f; MonsterRoom.CreateEnemiesEvent createEnemies = (Room room, Player player, List<Enemy> enemies) => { enemies.Add(new FireWizard(spawnEnemyCamera)); FireCaster caster = new FireCaster(spawnEnemyCamera + Room.TileToWorldPos(-5, 0)); caster.maxShootTimer = 90; enemies.Add(caster); caster = new FireCaster(spawnEnemyCamera + Room.TileToWorldPos(0, -5)); caster.maxShootTimer = 90; enemies.Add(caster); caster = new FireCaster(spawnEnemyCamera + Room.TileToWorldPos(5, 0)); caster.maxShootTimer = 90; enemies.Add(caster); }; MonsterRoom.CreateEndEvent createEnd = (Room room, Player player) => { List<CameraEvent> events = new List<CameraEvent>(); events.Add(new CameraEvent(door1Camera, (Room r, Player p, int time) => { ((Door)room.tiles[top.width / 2, top.height - 5].puzzle).Open(); })); events.Add(new CameraEvent(door2Camera, (Room r, Player p, int time) => { ((Door)room.tiles[top.width / 2, 4].puzzle).Open(); })); return events; }; topMonsterRoom = new MonsterRoom(top, createStart, spawnEnemyCamera, createEnemies, createEnd); }
private void MakeMonsterRoom2() { Vector2 door1Camera = Room.TileToWorldPos(new Vector2(8.5f, 36.5f)); Vector2 door2Camera = Room.TileToWorldPos(new Vector2(8.5f, 20.5f)); MonsterRoom.CreateStartEvent createStart = (Room room, Player player) => { List<CameraEvent> events = new List<CameraEvent>(); events.Add(new CameraEvent(door1Camera, (Room r, Player p, int time) => { ((Door)room.tiles[8, 36].puzzle).Close(); })); events.Add(new CameraEvent(door2Camera, (Room r, Player p, int time) => { ((Door)room.tiles[8, 20].puzzle).Close(); })); return events; }; Vector2 spawnEnemyCamera = (door1Camera + door2Camera) / 2f; MonsterRoom.CreateEnemiesEvent createEnemies = (Room room, Player player, List<Enemy> enemies) => { FireCaster enemy = new FireCaster(spawnEnemyCamera + Room.TileToWorldPos(-5, -3)); enemy.maxShootTimer = 90; enemies.Add(enemy); enemy = new FireCaster(spawnEnemyCamera + Room.TileToWorldPos(5, -3)); enemy.maxShootTimer = 90; enemies.Add(enemy); }; MonsterRoom.CreateEndEvent createEnd = (Room room, Player player) => { List<CameraEvent> events = new List<CameraEvent>(); events.Add(new CameraEvent(door1Camera, (Room r, Player p, int time) => { ((Door)room.tiles[8, 36].puzzle).Open(); })); events.Add(new CameraEvent(door2Camera, (Room r, Player p, int time) => { ((Door)room.tiles[8, 20].puzzle).Open(); })); return events; }; monsterRoom2 = new MonsterRoom(topRight, createStart, spawnEnemyCamera, createEnemies, createEnd); }