示例#1
0
    Actor::~Actor()
    {
        // Alle möglichen Area-Verknüpfungen entfernen
        GameEventManager::getSingleton().removeAllAreas(this);
        // Alle TrackAnimations entfernen
        AnimationManager::getSingleton().removeAllTrackAnimations(this);

        detachAllChildren();

        if (mParent == NULL)
        {
            removeFromScene();
        }
        else
        {
            mParent->detach( this );  
        }

        if (mActorControlledObject != NULL)
        {
            mActorControlledObject->_setActor(0);
            mActorControlledObject = NULL;
        }

        if (mPhysicalThing != NULL)
        {
            mPhysicalThing->_setActor(0);
            mPhysicalThing = NULL;
        }

        /// @todo Highlightmaterial entfernen
        delete mDescription;
    }
示例#2
0
文件: visnode.cpp 项目: ejabx/katana
//
// Destructor
//
VisNode::~VisNode()
{
	detachAllChildren();
	removeAllStates();
}