Example #1
0
    def update(self, dt):
        if randrange(60) == 0:
            self.vx = -self.vx

        Ship.update(self, dt)

        if self.vx > 0:
            self.image = self.orig_image
        else:
            self.image = self.flipped_image
Example #2
0
    def update(self, dt):
        if randrange(60) == 0:
            self.vx = -self.vx

        Ship.update(self, dt)

        if self.vx > 0:
            self.image = self.orig_image
        else:
            self.image = self.flipped_image
Example #3
0
    def update(self, dt):
        #one in 60 chance it will flip directions
        if randrange(60) == 0:
            self.vx = -self.vx
        
        Ship.update(self, dt)

        if self.vx > 0:
            self.image = self.orig_image
        else:
            self.image = self.flipped_image
Example #4
0
    def update(self, dt):
        vx = self.vx
        vy = self.vy
        
        Ship.update(self, dt)

        if vx != self.vx or vy != self.vy:
            if vx != self.vx:
                vx = self.vx
                vy = -vy
            else:
                vx = -vx
                vy = self.vy
Example #5
0
    def update(self, dt):
        vx = self.vx
        vy = self.vy

        Ship.update(self, dt)

        if vx != self.vx or vy != self.vy:
            if vx != self.vx:
                vx = self.vx
                vy = -vy
            else:
                vx = -vx
                vy = self.vy
            tie = TieFighter(self.rect.x, self.rect.y, vx, vy, self.bounds, self.color)

            for group in self.groups():
                group.add(tie)
Example #6
0
    def update(self, dt):
        vx = self.vx
        vy = self.vy

        Ship.update(self, dt)

        # create a new ship if bounced (when they bounce, vx, vy no longer = self.vx or self.vy
        if vx != self.vx or vy != self.vy:
            if vx != self.vx:
                vx = self.vx
                vy = -vy
            else: 
                vx = -vx
                vy = self.vy

            tie = TieFighter(self.rect.x, self.rect.y, vx, vy, self.bounds, self.color)
            for group in self.groups():
                group.add(tie)
Example #7
0
    def update(self, dt):
        vx = self.vx
        vy = self.vy
 
        Ship.update(self, dt)
 
        if vx != self.vx or vy != self.vy:
            if vx != self.vx:
                vx = self.vx
                vy = -vy
            else:
                vx = -vx
                vy = self.vy
 
            tie = TieFighter(self.rect.x, self.rect.y, vx, vy, self.bounds, self.color)
 
            for group in self.groups():
                group.add(tie)
Example #8
0
    def update(self, dt):
        #if randrange(60) == 0:
         #   self.vx = -self.vx

        Ship.update(self, dt)
Example #9
0
    def update(self, dt):
        vx = self.vx
        vy = self.vy

        Ship.update(self, dt)