mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59: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:
parent
ae84de2c7e
commit
1156582ceb
2 changed files with 7 additions and 0 deletions
|
@ -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();
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue