Mercurial > nagslang
comparison nagslang/game_object.py @ 647:aeb366d97774
Show splash image on startup
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sun, 08 Sep 2013 02:02:09 +0200 |
parents | db960388b912 |
children | baacd0462d8e |
comparison
equal
deleted
inserted
replaced
646:45dbbc4c1fd0 | 647:aeb366d97774 |
---|---|
315 self.add_timer('timeout', timeout) | 315 self.add_timer('timeout', timeout) |
316 self.start_timer('timeout') | 316 self.start_timer('timeout') |
317 | 317 |
318 def update(self, dt): | 318 def update(self, dt): |
319 super(EphemeralNote, self).update(dt) | 319 super(EphemeralNote, self).update(dt) |
320 if not self.check_timer('timeout'): | |
321 return Result(remove=[self]) | |
322 | |
323 | |
324 class SplashImage(GameObject): | |
325 def __init__(self, image, timeout): | |
326 super(SplashImage, self).__init__( | |
327 None, | |
328 render.NullRenderer(), | |
329 puzzle.YesPuzzler(), | |
330 render.ImageOverlay(image), | |
331 ) | |
332 self.add_timer('timeout', timeout) | |
333 self.start_timer('timeout') | |
334 | |
335 def update(self, dt): | |
336 super(SplashImage, self).update(dt) | |
320 if not self.check_timer('timeout'): | 337 if not self.check_timer('timeout'): |
321 return Result(remove=[self]) | 338 return Result(remove=[self]) |
322 | 339 |
323 | 340 |
324 class FloorLight(GameObject): | 341 class FloorLight(GameObject): |