A lot of game logic has been implemented in the different entities, now we look at functionality that is defined in the
World class. You have already seen the collision in the last section.
During the game, entities are destroyed in battle, and have to be removed from the scene graph. We do not remove them instantly. Once in a frame, we iterate through the scene graph, check which nodes have been destroyed, and detach them from their parents. To find out whether a node has been destroyed, we write the virtual function
SceneNode::isDestroyed(). By default, it returns false. A derived entity may specify a condition under which it returns true. Usually, this will be the case when the hitpoints are zero or ...