def _Logic_Update(self, timeElapsed): """This method is simple, but important. It signals the Entities within our dictionary of entities to update themselves with only the timeElapsed as new data. NOTE: This may be able to be put into the Entity_Manager class instead of here.""" #Before updating any of the entities, we need to call all of the active system functions (providing the associated entities as arguments.) for (sSystemFuncName, lEntities) in System_Manager._Get_Active_Systems(): #print sSystemFuncName + " system is being exectuted." sNextState = self._Call_System_Func(sSystemFuncName, lEntities) if sNextState != "NULL,NULL": return sNextState.split(',') #This block iterates through all of the entities in our dictionary of dictionaries and signals each to update itself. for (sEntityType, dEntities) in self._dEntities.items(): for (sEntityName, entity) in dEntities.items(): #Check to see if the Entity is expired if entity._Is_Expired(): entity._On_Expire() self._Remove_Entity(entity._Get_Type(), entity._Get_Name()) entity._Update(timeElapsed) return ["NULL","NULL"]
def _Logic_Update(self, timeElapsed): """This method is simple, but important. It signals the Entities within our dictionary of entities to update themselves with only the timeElapsed as new data. NOTE: This may be able to be put into the Entity_Manager class instead of here.""" #Before updating any of the entities, we need to call all of the active system functions (providing the associated entities as arguments.) for (sSystemFuncName, lEntities) in System_Manager._Get_Active_Systems(): #print sSystemFuncName + " system is being exectuted." sNextState = self._Call_System_Func(sSystemFuncName, lEntities) if sNextState != "NULL,NULL": return sNextState.split(',') #This block iterates through all of the entities in our dictionary of dictionaries and signals each to update itself. for (sEntityType, dEntities) in self._dEntities.items(): for (sEntityName, entity) in dEntities.items(): #Check to see if the Entity is expired if entity._Is_Expired(): entity._On_Expire() self._Remove_Entity(entity._Get_Type(), entity._Get_Name()) entity._Update(timeElapsed) return ["NULL", "NULL"]