/** * Takes care of any events from the core game engine, * and passes them on to its InteractiveSurface child elements. * @param action Pointer to an action. */ void State::handle(Action *action) { for (std::vector<Surface*>::reverse_iterator i = _surfaces.rbegin(); i != _surfaces.rend(); ++i) { InteractiveSurface* j = dynamic_cast<InteractiveSurface*>(*i); if (j != 0) j->handle(action, this); } }
/** * Takes care of any events from the core game engine, * and passes them on to its InteractiveSurface child elements. * @param action Pointer to an action. */ void State::handle(Action *action) { for (std::vector<Surface*>::iterator i = _surfaces.begin(); i < _surfaces.end(); i++) { InteractiveSurface* j = dynamic_cast<InteractiveSurface*>(*i); if (j != 0) j->handle(action, this); } }