Example #1
0
 def __init__(self, air):
     DistributedMinigameAI.__init__(self, air)
     self.trucks = []
     self.suits = []
     self.trucksOutOfBarrels = 0
     self.barrelsRemaining = 0
     self.barrelsStolen = 0
     self.barrelsDelivered = 0
     self.totalBarrels = 0
 def __init__(self, air):
     DistributedMinigameAI.__init__(self, air)
     self.trucks = []
     self.suits = []
     self.trucksOutOfBarrels = 0
     self.barrelsRemaining = 0
     self.barrelsStolen = 0
     self.barrelsDelivered = 0
     self.totalBarrels = 0
Example #3
0
 def announceGenerate(self):
     DistributedMinigameAI.announceGenerate(self)
     truck0 = DistributedDeliveryTruckAI(self.air, self, 0)
     truck0.setNumBarrels(self.NumBarrelsInEachTruck)
     truck0.generateWithRequired(self.zoneId)
     self.trucks.append(truck0)
     totalBarrels = 0
     for truck in self.trucks:
         totalBarrels += truck.getNumBarrels()
     self.totalBarrels = totalBarrels
     self.setBarrelsRemaining(totalBarrels)
    def announceGenerate(self):
        DistributedMinigameAI.announceGenerate(self)
        truck0 = DistributedDeliveryTruckAI(self.air, self, 0)
        truck0.setNumBarrels(self.NumBarrelsInEachTruck)
        truck0.generateWithRequired(self.zoneId)
        self.trucks.append(truck0)
        totalBarrels = 0
        for truck in self.trucks:
            totalBarrels += truck.getNumBarrels()

        self.totalBarrels = totalBarrels
        self.setBarrelsRemaining(totalBarrels)
Example #5
0
 def delete(self):
     try:
         self.DistributedDeliveryGameAI_deleted
         return
     except:
         self.DistributedDeliveryGameAI_deleted = 1
     self.stopSuitSpawner()
     for truck in self.trucks:
         truck.requestDelete()
     self.trucks = None
     for suit in self.suits:
         suit.disable()
         suit.requestDelete()
     self.suits = None
     self.trucksOutOfBarrels = None
     self.barrelsRemaining = None
     self.barrelsStolen = None
     self.barrelsDelivered = None
     self.totalBarrels = None
     DistributedMinigameAI.delete(self)
    def delete(self):
        try:
            self.DistributedDeliveryGameAI_deleted
            return
        except:
            self.DistributedDeliveryGameAI_deleted = 1

        self.stopSuitSpawner()
        for truck in self.trucks:
            truck.requestDelete()

        self.trucks = None
        for suit in self.suits:
            suit.disable()
            suit.requestDelete()

        self.suits = None
        self.trucksOutOfBarrels = None
        self.barrelsRemaining = None
        self.barrelsStolen = None
        self.barrelsDelivered = None
        self.totalBarrels = None
        DistributedMinigameAI.delete(self)
        return
 def d_gameOver(self, winner = 0, winnerDoId = []):
     DistributedMinigameAI.d_gameOver(self, winner, winnerDoId)
     self.stopSuitSpawner()
 def allAvatarsReady(self):
     DistributedMinigameAI.allAvatarsReady(self)
     self.startSuitSpawner()
Example #9
0
 def d_gameOver(self, winner=0, winnerDoId=[]):
     DistributedMinigameAI.d_gameOver(self, winner, winnerDoId)
     self.stopSuitSpawner()
Example #10
0
 def allAvatarsReady(self):
     DistributedMinigameAI.allAvatarsReady(self)
     self.startSuitSpawner()