1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-25 05:58:30 +02:00

Add entityclass::removeentity()

Ok, once we switch everything over to not use the 'active' system, it's
easier to read removeentity(t) than it is to read
entities.erase(entities.begin() + t).
This commit is contained in:
Misa 2020-04-03 13:03:02 -07:00 committed by Ethan Lee
parent ae84de2c7e
commit 1156582ceb
2 changed files with 7 additions and 0 deletions

View File

@ -1173,6 +1173,11 @@ void entityclass::createblock( int t, int xp, int yp, int w, int h, int trig /*=
}
}
void entityclass::removeentity(int t)
{
entities[t].active = false;
}
void entityclass::removeallblocks()
{
for(int i=0; i<nblocks; i++) blocks[i].clear();

View File

@ -64,6 +64,8 @@ public:
void createblock(int t, int xp, int yp, int w, int h, int trig = 0);
void removeentity(int t);
void removeallblocks();
void removeblock(int t);