def update(self, cursor, time): if self.fade == "out": opacity(self.faderect, time * self.fadespeed, True) if opacity(self.faderect) == 255: self.finish(*self.fadetarget) elif self.fade == "in": opacity(self.faderect, time * -self.fadespeed, True) if opacity(self.faderect) == 0: self.fade = None self.time += time self.player.update(time) self.state.stats.update(time) cursor.caption = "" if cursor.position[0] >= self.player.x: cursor.image = "right" else: cursor.image = "left" for object in self.objects: object.update(time) if object.interactive and object.contains(cursor.position): cursor.image = "interact" try: cursor.caption = object.name + ": " + object.interactive except AttributeError: cursor.caption = object.__class__.__name__ + ": " + object.interactive
def update(self, cursor, time): if self.fade == "out": opacity(self.faderect, time*self.fadespeed, True) if opacity(self.faderect) == 255: self.finish(*self.fadetarget) elif self.fade == "in": opacity(self.faderect, time*-self.fadespeed, True) if opacity(self.faderect) == 0: self.fade = None self.time += time self.player.update(time) self.state.stats.update(time) cursor.caption = "" if cursor.position[0] >= self.player.x: cursor.image = "right" else: cursor.image = "left" for object in self.objects: object.update(time) if object.interactive and object.contains(cursor.position): cursor.image = "interact" try: cursor.caption = object.name+": "+object.interactive except AttributeError: cursor.caption = object.__class__.__name__+": "+object.interactive
def _update(self, cursor, time): opacity(self.goal, (1 - (self.state.total / 35)) * 255) self.update(cursor, time)
def update(self, cursor, time): if self.titletime > 5200: if not self.done: opacity(self.title, 255) cursor.image = "interact" cursor.caption = "Begin" else: if self.logoalpha > 0: if self.fadein: self.logoalpha += time * 0.15 if self.logoalpha > 255: self.logoalpha = 255 self.fadein = False else: self.logoalpha -= time * 0.1 if self.logoalpha < 0: self.logoalpha = 0 opacity(self.logo, self.logoalpha) self.logo.y += time * 0.05 else: self.titletime += time if self.titletime <= 1000: opacity(self.title, 255) if self.titletime <= 2000: opacity(self.title, 0) elif self.titletime < 3000: opacity(self.title, 255) elif self.titletime < 3500: opacity(self.title, 0) elif self.titletime < 4000: opacity(self.title, 255) elif self.titletime < 4900: opacity(self.title, 0)
def _update(self, cursor, time): opacity(self.goal, (1-(self.state.total/35))*255) self.update(cursor, time)
def update(self, cursor, time): if self.titletime > 5200: if not self.done: opacity(self.title, 255) cursor.image = "interact" cursor.caption = "Begin" else: if self.logoalpha > 0: if self.fadein: self.logoalpha += time*0.15 if self.logoalpha > 255: self.logoalpha = 255 self.fadein = False else: self.logoalpha -= time*0.1 if self.logoalpha < 0: self.logoalpha = 0 opacity(self.logo, self.logoalpha) self.logo.y += time*0.05 else: self.titletime += time if self.titletime <= 1000: opacity(self.title, 255) if self.titletime <= 2000: opacity(self.title, 0) elif self.titletime < 3000: opacity(self.title, 255) elif self.titletime < 3500: opacity(self.title, 0) elif self.titletime < 4000: opacity(self.title, 255) elif self.titletime < 4900: opacity(self.title, 0)