def __init__(self, text, choices, title=None): GameState.__init__(self) self.text = text self.state = 0 self.counter = 0 self.title = title self.choices = choices
def activate(self): GameState.activate(self) # this is hack, for sure, but ensure our music will start # playing if we are being transition'd from another state if self.dialogs[-1][:6] == "#music": text = self.dialogs.pop() tag, path = text.split(":") #res.playMusic(path, loops=-1) self.cleared = False
def __init__(self, path): GameState.__init__(self) self.dialogs = [] with open(path) as fh: for line in fh: line = line.strip() if line != "": self.dialogs.append(line) self.dialogs.reverse() self.queue_image = None self.queue_music = None self.queue_dialog = None
def reactivate(self): GameState.reactivate(self) self.cleared = False
def deactivate(self): GameState.deactivate(self) res.fadeoutMusic()
def __init__(self, text, title=None): GameState.__init__(self) self.font = "dpcomic.ttf" self.text = text self.title = title self.blank = True
def __init__(self, area, startPosition=None): GameState.__init__(self) self.area = area