1
This commit is contained in:
parent
079c704393
commit
acdfbeb9ca
@ -1,5 +1,7 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include <a8/collision.h>
|
||||
|
||||
#include "metamgr.h"
|
||||
#include "room.h"
|
||||
#include "collider.h"
|
||||
@ -12,6 +14,8 @@
|
||||
#include "roomobstacle.h"
|
||||
#include "explosion.h"
|
||||
#include "entityfactory.h"
|
||||
#include "player.h"
|
||||
#include "incubator.h"
|
||||
|
||||
RoomObstacle::RoomObstacle():Obstacle()
|
||||
{
|
||||
@ -907,4 +911,24 @@ void RoomObstacle::ActivePortal()
|
||||
if (room->IsGameOver()) {
|
||||
return;
|
||||
}
|
||||
bool ready = true;
|
||||
room->TraversePlayerList
|
||||
(
|
||||
a8::XParams(),
|
||||
[this, &ready] (Player* hum, a8::XParams& param)
|
||||
{
|
||||
if (!a8::IntersectCircleCircle
|
||||
(
|
||||
hum->GetPos(),
|
||||
hum->GetRadius(),
|
||||
GetPos(),
|
||||
meta->i->height()
|
||||
)) {
|
||||
ready = false;
|
||||
}
|
||||
}
|
||||
);
|
||||
if (ready) {
|
||||
room->GetIncubator()->NextWave();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user