void EntityManager::returnAllObjects() { Terrain::hardGenerating = true; waypoint->reset(); projectiles->freeAll(); enemies->freeAll(); items->freeAll(); deleteBoss(); }
/** * \brief 阶段结束事件的处理 * 不同阶段结束时处理不同 * 复活、清除的动作是在阶段结束时发生 * 如果动作是移动,在阶段结束时未到达目的地,则直接跳转过去 * */ void Rush::onPhaseTimeOver() { switch (phaseVector[curPhase].action) { case RUSH_RELIVE: { //Xlogger->debug("%s : 召唤boss",rushName); if (!summonBoss()) { Xlogger->error("怪物攻城: %s 召唤boss %s 失败,结束攻城",rushName,bossName); end = true; } } break; case RUSH_MOVETO: { //if (!boss) return; if (!boss->scene->zPosShortRange(boss->getPos(),phaseVector[curPhase].pos,phaseVector[curPhase].region)) boss->warp(phaseVector[curPhase].pos); } break; case RUSH_CLEAR: { clearServants(); } break; case RUSH_END: { deleteBoss(); clearServants(); end=true; } break; default: break; } enterNextPhase(); }
void EntityManager::spawnBoss(glm::vec3 pos) { deleteBoss(); boss = new Boss(pos, player); }