1
This commit is contained in:
parent
00cea231a5
commit
af7e06aea8
@ -14,6 +14,11 @@ void Incubator::UnInit()
|
||||
|
||||
}
|
||||
|
||||
void Incubator::AllocAndroid(Human* target, int num)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Incubator::RecycleAndroid(Human* hum)
|
||||
{
|
||||
Human* nearest_hum = nullptr;
|
||||
@ -31,18 +36,17 @@ void Incubator::RecycleAndroid(Human* hum)
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if (hum->dead) {
|
||||
hum->RemoveBuffByEffectId(kBET_BeRecycle);
|
||||
return;
|
||||
}
|
||||
if (distance < 450) {
|
||||
hum->RemoveBuffByEffectId(kBET_BeRecycle);
|
||||
return;
|
||||
}
|
||||
if (distance > 1450) {
|
||||
hum->RemoveBuffByEffectId(kBET_BeRecycle);
|
||||
AddHoldHuman(nearest_hum);
|
||||
hold_humans_.insert(hum);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void Incubator::AddHoldHuman(Human* hum)
|
||||
{
|
||||
hold_humans_.insert(hum);
|
||||
}
|
||||
|
@ -9,10 +9,10 @@ class Incubator
|
||||
|
||||
void Init();
|
||||
void UnInit();
|
||||
void AllocAndroid(Human* target, int num);
|
||||
void RecycleAndroid(Human* hum);
|
||||
|
||||
private:
|
||||
void AddHoldHuman(Human* hum);
|
||||
|
||||
private:
|
||||
std::set<Human*> hold_humans_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user