This commit is contained in:
aozhiwei 2022-09-30 10:25:52 +08:00
parent 8eb6737d43
commit a7ffcdfd06
3 changed files with 8 additions and 2 deletions

View File

@ -21,10 +21,14 @@ void Incubator::Init()
incubator->AutoAllocAndroid();
},
&xtimer_attacher_.timer_list_);
}
void Incubator::InitPve()
{
if (room->IsPveRoom()) {
room->pve_data.max_wave = room->pve_mode_meta->mode_time.size();
int wave = 0;
int total_time = room->GetGasInactiveTime() * 1000;
int total_time = 0;
SpawnWaveMon(0);
for (int time : room->pve_mode_meta->mode_time) {
total_time += time;

View File

@ -11,6 +11,7 @@ class Incubator
void Init();
void UnInit();
void InitPve();
void AllocAndroid(Human* target, int num);
void RecycleAndroid(Human* hum);
void ActiveAndroid(Human* hum, Human* android);

View File

@ -1342,6 +1342,7 @@ void Room::UpdateGasInactivePve()
OnBattleStart();
NotifyGameStart();
InitAndroidAI();
incubator_->InitPve();
}
}
@ -2443,7 +2444,7 @@ long long Room::GetGasInactiveTime()
App::Instance()->debug_params[1] : 10;
#endif
if (IsPveRoom()) {
return 0;
return 10;
} else {
return MetaMgr::Instance()->gas_inactive_time;
}