1
This commit is contained in:
parent
8eb6737d43
commit
a7ffcdfd06
@ -21,10 +21,14 @@ void Incubator::Init()
|
|||||||
incubator->AutoAllocAndroid();
|
incubator->AutoAllocAndroid();
|
||||||
},
|
},
|
||||||
&xtimer_attacher_.timer_list_);
|
&xtimer_attacher_.timer_list_);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Incubator::InitPve()
|
||||||
|
{
|
||||||
if (room->IsPveRoom()) {
|
if (room->IsPveRoom()) {
|
||||||
room->pve_data.max_wave = room->pve_mode_meta->mode_time.size();
|
room->pve_data.max_wave = room->pve_mode_meta->mode_time.size();
|
||||||
int wave = 0;
|
int wave = 0;
|
||||||
int total_time = room->GetGasInactiveTime() * 1000;
|
int total_time = 0;
|
||||||
SpawnWaveMon(0);
|
SpawnWaveMon(0);
|
||||||
for (int time : room->pve_mode_meta->mode_time) {
|
for (int time : room->pve_mode_meta->mode_time) {
|
||||||
total_time += time;
|
total_time += time;
|
||||||
|
@ -11,6 +11,7 @@ class Incubator
|
|||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
void UnInit();
|
void UnInit();
|
||||||
|
void InitPve();
|
||||||
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);
|
||||||
|
@ -1342,6 +1342,7 @@ void Room::UpdateGasInactivePve()
|
|||||||
OnBattleStart();
|
OnBattleStart();
|
||||||
NotifyGameStart();
|
NotifyGameStart();
|
||||||
InitAndroidAI();
|
InitAndroidAI();
|
||||||
|
incubator_->InitPve();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2443,7 +2444,7 @@ long long Room::GetGasInactiveTime()
|
|||||||
App::Instance()->debug_params[1] : 10;
|
App::Instance()->debug_params[1] : 10;
|
||||||
#endif
|
#endif
|
||||||
if (IsPveRoom()) {
|
if (IsPveRoom()) {
|
||||||
return 0;
|
return 10;
|
||||||
} else {
|
} else {
|
||||||
return MetaMgr::Instance()->gas_inactive_time;
|
return MetaMgr::Instance()->gas_inactive_time;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user