Exemple #1
0
    def __init__(self, cr):
        """
        cr: instance of ClientRepository
        """
        DistributedPartyTeamActivity.__init__(
            self,
            cr,
            PartyGlobals.ActivityIds.PartyTugOfWar,
            startDelay=PartyGlobals.TugOfWarStartDelay)
        assert (self.notify.debug("__init__"))

        # these are the indices of the active buttons
        self.buttons = [0, 1]

        # these variables are used for calculation how fast the player is pressing the keys
        self.arrowKeys = None
        self.keyTTL = []
        self.idealRate = 0.0
        self.keyRate = 0
        self.allOutMode = False
        self.rateMatchAward = 0.0  # bonus for consistently hitting the ideal rate

        self.toonIdsToStartPositions = {}  # initial positions of toons
        self.toonIdsToIsPullingFlags = {}  # whether or not a toon is pulling
        self.toonIdsToRightHands = {}  # used for setting up ropes
        self.fallenToons = []  # toons in the water
        self.fallenPositions = []
        self.unusedFallenPositionsIndices = [0, 1, 2, 3]
        self.toonIdsToAnimIntervals = {}
        self.tugRopes = []
 def __init__(self, cr):
     DistributedPartyTeamActivity.__init__(
         self,
         cr,
         PartyGlobals.ActivityIds.PartyCog,
         startDelay=PartyGlobals.CogActivityStartDelay,
         balanceTeams=PartyGlobals.CogActivityBalanceTeams)
 def __init__(self,
              cr,
              arenaModel='phase_13/models/parties/cogPieArena_model',
              texture=None):
     DistributedPartyTeamActivity.__init__(
         self,
         cr,
         PartyGlobals.ActivityIds.PartyCog,
         startDelay=PartyGlobals.CogActivityStartDelay,
         balanceTeams=PartyGlobals.CogActivityBalanceTeams)
     self.arenaModel = arenaModel
     self.texture = texture
Exemple #4
0
 def __init__(self, cr):
     DistributedPartyTeamActivity.__init__(self, cr, PartyGlobals.ActivityIds.PartyTugOfWar, startDelay=PartyGlobals.TugOfWarStartDelay)
     self.buttons = [0, 1]
     self.arrowKeys = None
     self.keyTTL = []
     self.idealRate = 0.0
     self.keyRate = 0
     self.allOutMode = False
     self.rateMatchAward = 0.0
     self.toonIdsToStartPositions = {}
     self.toonIdsToIsPullingFlags = {}
     self.toonIdsToRightHands = {}
     self.fallenToons = []
     self.fallenPositions = []
     self.unusedFallenPositionsIndices = [0,
      1,
      2,
      3]
     self.toonIdsToAnimIntervals = {}
     self.tugRopes = []
 def __init__(self, cr, arenaModel = 'phase_13/models/parties/cogPieArena_model', texture = None):
     DistributedPartyTeamActivity.__init__(self, cr, PartyGlobals.ActivityIds.PartyCog, startDelay=PartyGlobals.CogActivityStartDelay, balanceTeams=PartyGlobals.CogActivityBalanceTeams)
     self.arenaModel = arenaModel
     self.texture = texture