Ejemplo n.º 1
0
    def script4(game, x, y, dx, dy):
        prev = None
        r = game.new_size
        for i in range(40):
            orb = Orb(x, y, r)
            orb.spawn(game.spatialhash)
            game.orbs.append(orb)

            x += dx * game.new_size * 2
            y += dy * game.new_size * 2
            if prev:
                orb.append(prev)
            prev = orb
Ejemplo n.º 2
0
 def insert_action(game, x, y):
     orb = Orb(x, y, game.new_size)
     orb.spawn(game.spatialhash)
     game.orbs.append(orb)