def __init__(self, fileName): self.basePath = 'commands/tutorial/' text = open(self.basePath+fileName, 'r').read() text = text.split('%%')[1:] self.name = text[0].split('=')[1].strip() self.sound = text[1].split('=')[1].strip() self.title = text[2].split('=')[1].strip() self.text = text[3].split('=')[1].strip() self.boardPos = text[4].split('=')[1].strip() self.script = text[5].splitlines()[1:] self.soundtrack = audio.getSound(self.basePath+self.sound) self.original_command_history_length = len(archyState.commandHistory._history) self.setupExample() self.movie = self.setupMovie()
def __init__(self, fileName): self.basePath = 'commands/tutorial/' text = open(self.basePath + fileName, 'r').read() text = text.split('%%')[1:] self.name = text[0].split('=')[1].strip() self.sound = text[1].split('=')[1].strip() self.title = text[2].split('=')[1].strip() self.text = text[3].split('=')[1].strip() self.boardPos = text[4].split('=')[1].strip() self.script = text[5].splitlines()[1:] self.soundtrack = audio.getSound(self.basePath + self.sound) self.original_command_history_length = len( archyState.commandHistory._history) self.setupExample() self.movie = self.setupMovie()
def playFailedLeapSound(self): import audio sound = audio.getSound(self.FAILED_LEAP_SOUND_FILE) sound.play()
def __init__(self): threading.Thread.__init__(self) self.sound = audio.getSound('commands/tutorial/keyclick.wav') self.sound.set_volume(.1) self.history = {}