コード例 #1
0
	def	patternList(self):
		mList = []
		mList.append((movement.Line(Vector2(1,0),4,-3,1),5000))
		mList.append((movement.Line(Vector2(0,1),4,-3,1),5000))
		mList.append((movement.Line(Vector2(-1,0),4,-3,1),5000))
		mList.append((movement.Line(Vector2(0,-1),4,-3,1),5000))
		return mList
コード例 #2
0
    def update(self, origin, target, timePassed):
        self.timePassed += timePassed
        bulletlist = []
        if self.timePassed % 250 != self.timePassed:
            posx = origin.rect.centerx
            posy = origin.rect.centery
            posx += self.vet.x
            posy += self.vet.y
            for i in range(0, 24):
                posx = origin.rect.centerx
                posy = origin.rect.centery
                posx += self.vet.x
                posy += self.vet.y
                r = Rect(posx, posy, self.surf1.get_width(),
                         self.surf1.get_height())
                r.center = (posx, posy)
                bulletlist.append(
                    bullet.Bullet(
                        r, self.surf1,
                        movement.Line(Vector2(self.vet.x, self.vet.y), 0.6, 4,
                                      6), self.mask1))
                self.vet.rotate_ip(15)
            self.timePassed = 0

        return bulletlist
コード例 #3
0
 def helper(self, bulletlist, vet, origin):
     posx = origin.rect.centerx
     posy = origin.rect.centery
     posx += vet.x
     posy += vet.y
     r = Rect(posx, posy, self.surf1.get_width(), self.surf1.get_height())
     r.center = (posx, posy)
     bulletlist.append(
         bullet.Bullet(r, self.surf1,
                       movement.Line(Vector2(vet.x, vet.y), 5, -10, 1),
                       self.mask1))
     vet.rotate_ip(10)
コード例 #4
0
 def update(self, origin, timepassed):
     self.timePassed += timepassed
     bulletlist = []
     if (self.timePassed >= 15):
         r = Rect(0, 0, self.surf1.get_width(), self.surf1.get_height())
         r.center = (origin.rect.centerx + self.v.x,
                     origin.rect.centery + self.v.y)
         bulletlist.append(
             bullet.Bullet(r, self.surf1, movement.Line(self.v, 20, 0, 10),
                           self.mask1))
         self.timePassed = 0
     return bulletlist
コード例 #5
0
	def patternList(self):
		mList = []
		mList.append((movement.Line(Vector2(1,0),3,0,1),2000))
		mList.append((movement.Circle1FullTurn(4, True, 10),0))
		mList.append((movement.Line(Vector2(1,0),3,0,1),2000))
		return mList