示例#1
0
    def timedFire(info):  #fires periodically
        if (info.gunDelay < 1):
            return  #firing disabled
        b = Bullet.bullet(info.ship.getPosition(), (0, -80), (255, 255, 255),
                          info.info.fps)
        info.bullets[0].append(b)
        info.bullets[1] += b.getPolygons()

        info.info.addTimedEvent(info.gunDelay, [info.timedFire], [()])
示例#2
0
import requests

import PlayermodelC as player
import Bullet
import atexit

Display_W = 800
Display_L = 640

DisplayScreen = pg.display.set_mode((Display_W, Display_L))
clock = pg.time.Clock()

pg.init()

Player = player.Playermodel()
Bullet = Bullet.bullet()


class mouse_circle(pg.sprite.Sprite):
    def __init__(self, dp):
        super().__init__()

        self.pos = (0, 0)

        self.cursor = pg.draw.circle(dp, ((0, 0, 0)), self.pos, 0)


def menu_animation():

    pg.mouse.set_visible(False)
    n = 1