Exemplo n.º 1
0
 // Adds a retained child as a layer
 bool Scene::addChild(std::tr1::shared_ptr<Agent> agent, std::string name /*= ""*/)
 {
     bool retVal = Agent::addChild(agent, name);
     
     if (retVal && _sceneView && agent->getView())
     {
         _sceneView->addLayer((LayerView *)agent->getView());
     }
     
     return retVal;
 }
Exemplo n.º 2
0
 // Adds a retained child as an actor
 bool Actor::addChild(std::tr1::shared_ptr<Agent> agent, std::string name /*= ""*/)
 {
     bool retVal = Agent::addChild(agent, name);
     
     if (retVal && _actorView && agent->getView())
     {
         _actorView->addChild((ActorView *)agent->getView());
     }
     
     return retVal;
 }