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)
|
void Incubator::RecycleAndroid(Human* hum)
|
||||||
{
|
{
|
||||||
Human* nearest_hum = nullptr;
|
Human* nearest_hum = nullptr;
|
||||||
@ -31,18 +36,17 @@ void Incubator::RecycleAndroid(Human* hum)
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
if (hum->dead) {
|
||||||
|
hum->RemoveBuffByEffectId(kBET_BeRecycle);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (distance < 450) {
|
if (distance < 450) {
|
||||||
hum->RemoveBuffByEffectId(kBET_BeRecycle);
|
hum->RemoveBuffByEffectId(kBET_BeRecycle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (distance > 1450) {
|
if (distance > 1450) {
|
||||||
hum->RemoveBuffByEffectId(kBET_BeRecycle);
|
hum->RemoveBuffByEffectId(kBET_BeRecycle);
|
||||||
AddHoldHuman(nearest_hum);
|
hold_humans_.insert(hum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Incubator::AddHoldHuman(Human* hum)
|
|
||||||
{
|
|
||||||
hold_humans_.insert(hum);
|
|
||||||
}
|
|
||||||
|
@ -9,10 +9,10 @@ class Incubator
|
|||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
void UnInit();
|
void UnInit();
|
||||||
|
void AllocAndroid(Human* target, int num);
|
||||||
void RecycleAndroid(Human* hum);
|
void RecycleAndroid(Human* hum);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void AddHoldHuman(Human* hum);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::set<Human*> hold_humans_;
|
std::set<Human*> hold_humans_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user