示例#1
0
    def __init__(self):
        from FGAme.extra.letters import add_word

        super(GameOver, self).__init__(background=(255, 0, 0), gravity=10)
        Rectangle(shape=(600, 100), pos=(0, -200),
                  theta=math.pi / 9, world=self, mass='inf', color=(255, 0, 0))
        letters = add_word('game over', self, scale=5, pos=(-220, 50))
        for l in letters:
            l.inertia *= 20

        self.listen('key-down', 'enter', self.reinit)
示例#2
0
def game_over():
    '''Executed when the game finishes'''

    from FGAme.extra.letters import add_word

    Sx, Sy = 5, 2
    world = World(background=(255, 0, 0), gravity=10)
    letters = add_word('game over', world, scale=5, pos=(180, 350))
    for l in letters:
        l.omega = uniform(-0.1, 0.1)
        l.vel += uniform(-Sx, Sx), uniform(-Sy, Sy)
        l.inertia *= 20
    world.run()
示例#3
0
def game_over():
    """Executed when the game finishes"""

    from FGAme.extra.letters import add_word

    Sx, Sy = 5, 2
    world = World(background=(255, 0, 0), gravity=10)
    letters = add_word('game over', world, scale=5, pos=(180, 350))
    for l in letters:
        l.omega = uniform(-0.1, 0.1)
        l.vel += uniform(-Sx, Sx), uniform(-Sy, Sy)
        l.inertia *= 20
    world.run()
示例#4
0
    def __init__(self):
        from FGAme.extra.letters import add_word

        super(GameOver, self).__init__(background=(255, 0, 0), gravity=10)
        Rectangle(shape=(600, 100),
                  pos=(0, -200),
                  theta=math.pi / 9,
                  world=self,
                  mass='inf',
                  color=(255, 0, 0))
        letters = add_word('game over', self, scale=5, pos=(-220, 50))
        for l in letters:
            l.inertia *= 20

        self.listen('key-down', 'enter', self.reinit)