Ejemplo n.º 1
0
    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()
Ejemplo n.º 2
0
    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()
Ejemplo n.º 3
0
 def playFailedLeapSound(self):
     import audio
     sound = audio.getSound(self.FAILED_LEAP_SOUND_FILE)
     sound.play()
Ejemplo n.º 4
0
 def __init__(self):
     threading.Thread.__init__(self)
     self.sound = audio.getSound('commands/tutorial/keyclick.wav')
     self.sound.set_volume(.1)
     self.history = {}
Ejemplo n.º 5
0
 def __init__(self):
     threading.Thread.__init__(self)
     self.sound = audio.getSound('commands/tutorial/keyclick.wav')
     self.sound.set_volume(.1)
     self.history = {}