def fakeDownload(self, timePerPhase): self.phaseComplete = { 1: 100, 2: 100, 3: 0, 3.5: 0, 4: 0, 5: 0, 5.5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, } phaseTaskList = [] # Some phases should already be downloaded firstPhaseIndex = self.LauncherPhases.index(self.firstPhase) for phase in self.LauncherPhases[firstPhaseIndex:]: phaseTask = Task(self.fakeDownloadPhaseTask, ("phaseDownload" + str(phase))) phaseTask.timePerPhase = timePerPhase phaseTask.phase = phase phaseTaskList.append(phaseTask) phaseTaskList.append(Task(self.downloadDoneTask)) downloadSequence = Task.sequence(*phaseTaskList) taskMgr.remove("downloadSequence") taskMgr.add(downloadSequence, "downloadSequence")
def fakeDownload(self, timePerPhase): self.phaseComplete = { 1: 100, 2: 100, 3: 0, 3.5: 0, 4: 0, 5: 0, 5.5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0 } phaseTaskList = [] firstPhaseIndex = self.LauncherPhases.index(self.firstPhase) for phase in self.LauncherPhases[firstPhaseIndex:]: phaseTask = Task(self.fakeDownloadPhaseTask, 'phaseDownload' + str(phase)) phaseTask.timePerPhase = timePerPhase phaseTask.phase = phase phaseTaskList.append(phaseTask) phaseTaskList.append(Task(self.downloadDoneTask)) downloadSequence = Task.sequence(*phaseTaskList) taskMgr.remove('downloadSequence') taskMgr.add(downloadSequence, 'downloadSequence')