Example #1
0
BillboardSprite::~BillboardSprite(void)
{
	if (mNode)
	{
		auto objIter = mNode->getAttachedObjectIterator();
		SceneManager* mgr = SceneManagerContainer::getSceneManager();
		while (objIter.hasMoreElements())
			mgr->destroyMovableObject(objIter.getNext());
		mgr->destroySceneNode(mNode);
	}
}
Example #2
0
Monster::~Monster(void)
{
	if(mNode)
	{
		SceneManager* mgr = SceneManagerContainer::getSceneManager();
		auto objIter = mNode->getAttachedObjectIterator();
		while (objIter.hasMoreElements())
			mgr->destroyMovableObject(objIter.getNext());
		mNode = 0;
	}
	if (mCheckMethod)
	{
		delete mCheckMethod;
		mCheckMethod = 0;
	}
	if (mMonsterState)
	{
		delete mMonsterState;
		mMonsterState = 0;
	}
	
}