Example #1
0
File: Model.cs Project: Fobur/RPG
 public Model()
 {
     Map           = new Map(41);
     Player        = new Player(Map);
     Monsters      = CreateMonsters();
     AliveMonsters = new List <Monster>();
     AliveMonsters.AddRange(Monsters);
     foreach (var monster in Monsters)
     {
         monster.MonsterAttack     += (s, a) => CheckAttackZone(a, false, monster);
         monster.GetMap             = () => Map;
         monster.GetVisibleEntities = (monster) => Map.GetAllEntityInView(monster);
         monster.GetAliveMonsters   = () => AliveMonsters;
     }
 }