PRG3D
Member
|
RE: object counter
At the time I write ObjectCount Tool, and I've kind problem:
is someone have experience with something similar like this.
|
|
06-09-2011 07:59 PM |
|
Dandruff
Member
|
RE: object counter
make sure you're using the new physx dlls located in Installation\PhysX
|
|
06-10-2011 04:36 AM |
|
PRG3D
Member
|
RE: object counter
I've newest PhysX files..
its code in my Tool:
Code:
Game::ObjMemx<Game::Item> turrent;
Game::ObjMemx<Game::Item> ball;
Game::World.init()
.setObjType(turrent,OBJ_TURRENT)
.setObjType(ball,OBJ_BALL)
.New(path);
FAll(S + path + "/game/area", GetArea);//added into Memc<VecI2> areas new area
Flt areaSize = Game::World.areaSize();
FREPA(areas)
{
VecI2 &xz = areas(i);
App.name(S+i);
Game::World.update(areaSize * xz);
if (Grid<Game::Area> *grid = Game::World.areaActive(xz))
{
Game::Area &area = (*grid)();
REP(area.objs())
{
if(area.obj(i).type() == OBJ_TURRENT)
{
numOfTurrent++;
}
if(area.obj(i).type() == OBJ_BALL)
{
numOfBall++;
}
}
}
}
In game OBJ_TURRENT, and OBJ_BALL is child Game::Item.
|
|
06-10-2011 09:27 AM |
|