This commit is contained in:
aozhiwei 2022-08-22 19:22:14 +08:00
parent 743e77aa4d
commit 2f4051d7bd
2 changed files with 7 additions and 0 deletions

View File

@ -255,6 +255,11 @@ void Incubator::SpawnWaveMon(int wave)
if (room->IsGameOver()) { if (room->IsGameOver()) {
return; return;
} }
if (room->pve_data.refreshed_mon > 0 &&
room->pve_data.mon_num <= 0) {
timeout_ = true;
return;
}
auto& mons = room->pve_mode_meta->waves[wave]; auto& mons = room->pve_mode_meta->waves[wave];
for (MetaData::PveGeminiContent* content : mons) { for (MetaData::PveGeminiContent* content : mons) {
room->xtimer.AddDeadLineTimerAndAttach room->xtimer.AddDeadLineTimerAndAttach

View File

@ -14,6 +14,7 @@ class Incubator
void AllocAndroid(Human* target, int num); void AllocAndroid(Human* target, int num);
void RecycleAndroid(Human* hum); void RecycleAndroid(Human* hum);
void ActiveAndroid(Human* hum, Human* android); void ActiveAndroid(Human* hum, Human* android);
bool IsTimeOut() { return timeout_; };
private: private:
bool CanSee(Human* hum, Human* exclude_hum); bool CanSee(Human* hum, Human* exclude_hum);
@ -21,6 +22,7 @@ private:
void SpawnWaveMon(int wave); void SpawnWaveMon(int wave);
private: private:
bool timeout_ = false;
std::vector<Human*> hold_humans_; std::vector<Human*> hold_humans_;
a8::XTimerAttacher xtimer_attacher_; a8::XTimerAttacher xtimer_attacher_;
}; };