3D Engine/Application.cpp
// Call PreUpdate, Update and PostUpdate on all modules
Call PreUpdate, Update and PostUpdate on all modules
Call PreUpdate Update and PostUpdate on all modules
update_status Application::Update()
{
	update_status ret = UPDATE_CONTINUE;
	PrepareUpdate();
	std::list<Module*>::iterator item = list_modules.begin();
	while(item != list_modules.end() && ret == UPDATE_CONTINUE)
	{
		ret = item._Ptr->_Myval->PreUpdate(dt);
		item++;
	}
	item = list_modules.begin();
	while(item != list_modules.end() && ret == UPDATE_CONTINUE)
	{
		ret = item._Ptr->_Myval->Update(dt);
		item++;
	}
	item = list_modules.begin();
	while (item != list_modules.end() && ret == UPDATE_CONTINUE)
	{
		ret = item._Ptr->_Myval->PostUpdate(dt);
		item++;
	}
	FinishUpdate();
	return ret;
}
update_status Application :: Update ( ) { update_status ret = UPDATE_CONTINUE ; PrepareUpdate ( ) ; std :: list < Module * > :: iterator item = list_modules . begin ( ) ; while ( item != list_modules . end ( ) && ret == UPDATE_CONTINUE ) { ret = item . _Ptr -> _Myval -> PreUpdate ( dt ) ; item ++ ; } item = list_modules . begin ( ) ; while ( item != list_modules . end ( ) && ret == UPDATE_CONTINUE ) { ret = item . _Ptr -> _Myval -> Update ( dt ) ; item ++ ; } item = list_modules . begin ( ) ; while ( item != list_modules . end ( ) && ret == UPDATE_CONTINUE ) { ret = item . _Ptr -> _Myval -> PostUpdate ( dt ) ; item ++ ; } FinishUpdate ( ) ; return ret ; }
Call PreUpdate, Update and PostUpdate on all modules
Call PreUpdate Update and PostUpdate on all modules