Пример #1
0
def arc(speed, numshots, spread, cooldown = 30, image = None,
        payload = noPayload(),lifetime=300):
    def f(position, direction, momentum, shotgroup):
        for i in floatrange(direction - spread, direction + spread, numshots):
            sheading = vectorfromangle(i, speed) + momentum
            s = Shot(position=position, heading=sheading, image=image,
                     route=advance(), payload=payload, lifetime=lifetime)
            shotgroup.add(s)
    return Weapon(f, cooldown)
Пример #2
0
def machinegun(payload=noPayload()):
    return jitter(speed=10.0, spread=0.1, cooldown=5, payload=killPayload,
               lifetime=50)
Пример #3
0
def enemyweapon():
    return flap(cooldown=200,payload=noPayload())