public AdventureObject getAdventureObject()
 {
     switch (type)
     {
         case ObjectType.hidden:
             AdventureHidden hidden = new AdventureHidden(enemyType);
             hidden.location = new Vector2(x, y);
             return hidden;
         case ObjectType.special:
             AdventureSpecial special = new AdventureSpecial(screen, key - 1);
             special.location = new Vector2(x, y);
             return special;
         case ObjectType.stock:
             AdventureEntity entityFromStock = new AdventureEntity(Master.currentFile.stockEntities[enemyType]);
             entityFromStock.location = new Vector2(x, y);
             return entityFromStock;
         case ObjectType.teleporter:
             AdventureTeleporter exit = new AdventureTeleporter(dest, destx, desty, destroomX, destroomY);
             exit.location = new Vector2(x, y);
             return exit;
         case ObjectType.entity:
             AdventureEntity entity = new AdventureEntity(data);
             entity.location = new Vector2(x, y);
             return entity;
         case ObjectType.boss:
             if (enemyType == 2)
             {
                 AdventureBoss2 boss2 = new AdventureBoss2();
                 boss2.location = new Vector2(x, y);
                 return boss2;
             }
             else if (enemyType == 3)
             {
                 AdventureBoss3 boss3 = new AdventureBoss3();
                 boss3.location = new Vector2(x, y);
                 return boss3;
             }
             else if (enemyType == 4)
             {
                 AdventureBoss4 boss4 = new AdventureBoss4();
                 boss4.location = new Vector2(x, y);
                 return boss4;
             }
             else if (enemyType == 5)
             {
                 AdventureBoss5 boss5 = new AdventureBoss5();
                 boss5.location = new Vector2(x, y);
                 return boss5;
             }
             else if (enemyType == 6)
             {
                 AdventureBoss6 boss6 = new AdventureBoss6();
                 boss6.location = new Vector2(x, y);
                 return boss6;
             }
             else if (enemyType == 7)
             {
                 AdventureBoss7 boss7 = new AdventureBoss7();
                 boss7.location = new Vector2(x, y);
                 return boss7;
             }
             else if (enemyType == 8)
             {
                 AdventureBoss8 boss8 = new AdventureBoss8();
                 boss8.location = new Vector2(x, y);
                 return boss8;
             }
             else if (enemyType == 9)
             {
                 AdventureBoss9 boss9 = new AdventureBoss9();
                 boss9.location = new Vector2(x, y);
                 return boss9;
             }
             else if (enemyType == 10)
             {
                 AdventureBoss9Phase2 boss92 = new AdventureBoss9Phase2();
                 boss92.location = new Vector2(x, y);
                 return boss92;
             }
             else
             {
                 AdventureBoss1 boss1 = new AdventureBoss1();
                 boss1.location = new Vector2(x, y);
                 return boss1;
             }
         case ObjectType.shooter:
             AdventureShooter shooter = new AdventureShooter(enemyType == 1);
             shooter.location = new Vector2(x, y);
             return shooter;
         case ObjectType.enemy:
             AdventureEnemy enemy = new AdventureEnemy(Master.currentFile.bestiary[enemyType], enemyType);
             enemy.location = new Vector2(x, y);
             return enemy;
         case ObjectType.goldkey:
             AdventureGoldKey goldkey = new AdventureGoldKey();
             goldkey.location = new Vector2(x, y);
             return goldkey;
         case ObjectType.heart:
             AdventureHeart heart = new AdventureHeart();
             heart.location = new Vector2(x, y);
             return heart;
         default:
             AdventureKey key_ = new AdventureKey();
             key_.location = new Vector2(x, y);
             return key_;
     }
 }
 void SpawnEnemy(int x, int y, int enemy)
 {
     AdventureEnemy aE = new AdventureEnemy(Master.currentFile.bestiary[enemy], enemy);
     aE.location = new Vector2(x * 32 + 16, y * 32 + 16);
     addObject(aE);
 }
 public override void Update()
 {
     if (Vector2.Distance(location, parent.player.location) < 96 && !parent.isSolid(location, 0, 0, 0, Master.Directions.Down))
     {
         AdventureEnemy aE = new AdventureEnemy(Master.currentFile.bestiary[enemy], enemy);
         aE.location = location;
         parent.addObject(aE);
         active = false;
     }
 }
 void BecomeEnemy(int enemy, bool fatal)
 {
     AdventureEnemy aE = new AdventureEnemy(Master.currentFile.bestiary[enemy], enemy);
     aE.location = location;
     parent.addObject(aE);
     if (fatal)
         active = false;
 }