def tick(self, dt):
     ''' Update Function. '''
     if self.player:
         self.player.tick(dt)
     for eid, ent in self.enemies.iteritems():
         ent.tick(dt)
     for eid, ent in self.missiles.iteritems():
         ent.tick(dt)
     self.cleanup()
Ejemplo n.º 2
0
 def tick(self, dt):
     # for eid, ent in self.ents.iteritems():
         # ent.tick(dt)
     if self.player:
         self.player.tick(dt)
     for eid, ent in self.enemies.iteritems():
         ent.tick(dt)
     for eid, ent in self.missiles.iteritems():
         ent.tick(dt)
     # Cleanup
     self.Cleanup()
Ejemplo n.º 3
0
 def tick(self, dt):
     for eid, ent in self.ents.iteritems():
         ent.tick(dt)
Ejemplo n.º 4
0
    def tick(self, dt):

        if self.player!= None:
            self.player.tick(dt)

        if self.player2!=None:
            self.player2.tick(dt)

            for bullet in self.bullets2:
                bullet.tick(dt)
        
        for enem in self.enems:
            enem.tick(dt)

        for ent in self.ents:
            ent.tick(dt)

        for shield in self.shields:
            if self.player.score >= 2000:
                 shield.shieldsOn = False
                 print "shield off"
            shield.tick(dt)

        for bullet in self.bullets:
            bullet.tick(dt)

        for items in self.pickups:
            items.tick(dt)

        # pop out hit bullets from bullets
        temp = []
        for bullet in self.bullets:
            if bullet.isGone == False:
                temp.append(bullet)
        self.bullets = temp

        # pop out hit bullets from bullets2
        if self.player2!=None:
            temp = []
            for bullet in self.bullets2:
                if bullet.isGone == False:
                    temp.append(bullet)
            self.bullets2 = temp

        # pop out dead enemies from enems
        temp = []
        for enem in self.enems:
            if enem.death == False:
                temp.append(enem)
        self.enems = temp

        # pop out shields
        temp = []
        for shield in self.shields:
            if shield.shieldsOn == True:
                temp.append(shield)
        self.shields = temp

        temp = []
        for items in self.pickups:
            if items.death == False:
                temp.append(items)
        self.pickups = temp
Ejemplo n.º 5
0
 def tick(self, dt):
     for eid, ent in self.ents.iteritems():
         ent.tick(dt)
     for eid, proj in self.projectiles.iteritems():
         proj.tick(dt)
Ejemplo n.º 6
0
 def tick(self, dt):
     for uid, ent in self.ents.items():
         ent.tick(dt)
         if ent.pos.y < -2000:
             ent.destroy()
Ejemplo n.º 7
0
 def tick(self, dt):
     for ent in self.entList:
         ent.tick(dt)
     for ent in self.weaponList:
         ent.tick(dt)
Ejemplo n.º 8
0
 def tick(self, dt):        
     for ent in self.entList:        
         ent.tick(dt)        
     for ent in self.weaponList:
         ent.tick(dt)
Ejemplo n.º 9
0
    def tick(self, dt):
        for eid, ent in self.ents.iteritems():
            ent.tick(dt)
	pass