This commit is contained in:
aozhiwei 2022-08-17 15:59:19 +08:00
parent 224e22dd95
commit d527c83638
3 changed files with 39 additions and 2 deletions

View File

@ -19,6 +19,24 @@ void Incubator::Init()
incubator->AutoAllocAndroid();
},
&xtimer_attacher_.timer_list_);
if (room->IsPveRoom()) {
int wave = 0;
for (int time : room->pve_mode_meta->mode_time) {
room->xtimer.AddDeadLineTimerAndAttach
(
time * SERVER_FRAME_RATE,
a8::XParams()
.SetSender(this)
.SetParam1(wave),
[] (const a8::XParams& param)
{
Incubator* incubator = (Incubator*)param.sender.GetUserData();
incubator->SpawnWaveMon(param.param1.GetInt());
},
&xtimer_attacher_.timer_list_);
++wave;
}
}
}
void Incubator::UnInit()
@ -218,3 +236,8 @@ void Incubator::ActiveAndroid(Human* hum, Human* android)
}));
#endif
}
void Incubator::SpawnWaveMon(int wave)
{
}

View File

@ -18,6 +18,7 @@ class Incubator
private:
bool CanSee(Human* hum, Human* exclude_hum);
void AutoAllocAndroid();
void SpawnWaveMon(int wave);
private:
std::vector<Human*> hold_humans_;

View File

@ -1637,7 +1637,7 @@ namespace MetaData
float PveGemini::GetHpMul()
{
return 0;
}
void PveGeminiContent::Init()
@ -1647,7 +1647,20 @@ namespace MetaData
void PveGeminiMode::Init()
{
{
std::vector<std::string> strings;
a8::Split(pb->mode_time(), strings, '|');
for (auto& str : strings) {
int time = a8::XValue(str);
if (time <= 0) {
abort();
}
if (time > 200) {
abort();
}
mode_time.push_back(time);
}
}
}
}