1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01: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() void entityclass::removeallblocks()
{ {
for(int i=0; i<nblocks; i++) blocks[i].clear(); 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 createblock(int t, int xp, int yp, int w, int h, int trig = 0);
void removeentity(int t);
void removeallblocks(); void removeallblocks();
void removeblock(int t); void removeblock(int t);