~ubuntu-branches/ubuntu/hardy/solarwolf/hardy

« back to all changes in this revision

Viewing changes to code/gamefinish.py

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette
  • Date: 2002-03-29 10:14:11 UTC
  • Revision ID: james.westby@ubuntu.com-20020329101411-oyzguv1je7ln2p38
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"gamefinish handler. just lets our stars trickle"
 
2
 
 
3
import pygame
 
4
import gfx, game, snd
 
5
 
 
6
 
 
7
 
 
8
class GameFinish:
 
9
    def __init__(self, prevhandler):
 
10
        self.prevhandler = prevhandler
 
11
        self.ticks = 17
 
12
        self.started = 0
 
13
 
 
14
    def input(self, i):
 
15
        pass
 
16
 
 
17
    def event(self, e):
 
18
        pass
 
19
 
 
20
    def run(self):
 
21
        gfx.updatestars(self.background, gfx)
 
22
        self.ticks -= 1
 
23
        if not self.started:
 
24
            self.started = 1
 
25
            if snd.music:
 
26
                snd.music.fadeout(15*game.clock.fps_ticks)
 
27
 
 
28
        if not self.ticks:
 
29
            gfx.surface.fill(0)
 
30
            pygame.display.update()
 
31
            #pygame.time.delay(200)
 
32
            game.handler = self.prevhandler
 
33
 
 
34
 
 
35
    def background(self, area):
 
36
        return gfx.surface.fill((0, 0, 0), area)
 
37
 
 
38
 
 
39