Exemplo n.º 1
0
    def removeAvBlock(self, avId, block):
        """
        The removeAvBlock Method updates the starting block of the avatar
        which has requested removal from the starting block.

        Params: avId - the id of the avatar to remove from the block.
                block - the starting block object that the avatar will exit.
        Return: None
        """

        # Call the SuperClass Method
        DistributedKartPadAI.removeAvBlock(self, avId, block)

        # Remove the avatar from the kick dictionary and update the
        # local client dictionary as well.
        if (avId in self.kickAvDict):
            self.stopCountdown(self.kickAvDict[avId])
            del self.kickAvDict[avId]
Exemplo n.º 2
0
    def removeAvBlock(self, avId, block):
        """
        The removeAvBlock Method updates the starting block of the avatar
        which has requested removal from the starting block.

        Params: avId - the id of the avatar to remove from the block.
                block - the starting block object that the avatar will exit.
        Return: None
        """

        # Call the Super Class Method
        DistributedKartPadAI.removeAvBlock(self, avId, block)

        if (not self.isOccupied() and (self.timerTask is not None)):
            # Remove the TimerTask from the taskMgr and request
            # a state transition to the WaitEmpty since there are no
            # longer any toons occupying the kart.
            taskMgr.remove(self.timerTask)
            self.timerTask = None

            self.request('WaitEmpty')