Example #1
0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'DistributedTunnel')
     StagedObject.__init__(self, StagedObject.OFF)
     self.uniqueId = ''
     self.fakeZoneId = PiratesGlobals.FakeZoneId
     self.GridLOD = { }
     self.visNodes = { }
     self.geom = None
     self.envEffects = None
     self._links = { }
     self.areaWorldZone = [
         None,
         None]
     self.areaNode = [
         None,
         None]
     self._DistributedTunnel__loadedArea = None
     self.areaIndexLoading = None
     self.pendingAreaUnload = False
     self.pendingArea = None
     self.minimapObj = None
     self.builder = GridAreaBuilder.GridAreaBuilder(self)
     self.connectorNodes = [
         'portal_connector_1',
         'portal_connector_2']
     self.connectorNodePosHpr = []
     self.ambientNames = [
         None,
         None]
     self.avatarZoneContext = None
     self.floorIndex = -1
     self._inTransition = False
     self.ownHandles = []
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'winter_coach')
     self.cr = cr
     self.coach = None
     self.wheelBarrow = None
     self.coachNP = None
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'DistributedTunnel')
     StagedObject.__init__(self, StagedObject.OFF)
     self.uniqueId = ''
     self.fakeZoneId = PiratesGlobals.FakeZoneId
     self.GridLOD = {}
     self.visNodes = {}
     self.geom = None
     self.envEffects = None
     self._links = {}
     self.areaWorldZone = [None, None]
     self.areaNode = [None, None]
     self.__loadedArea = None
     self.areaIndexLoading = None
     self.pendingAreaUnload = False
     self.pendingArea = None
     self.minimapObj = None
     self.builder = GridAreaBuilder.GridAreaBuilder(self)
     self.connectorNodes = ['portal_connector_1', 'portal_connector_2']
     self.connectorNodePosHpr = []
     self.ambientNames = [None, None]
     self.avatarZoneContext = None
     self.floorIndex = -1
     self._inTransition = False
     self.ownHandles = []
     return
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'GameArea')
     MappableArea.__init__(self)
     StagedObject.__init__(self, StagedObject.OFF)
     self.uniqueId = ''
     self.geom = None
     self.funnelDisplayName = None
     self.previousDisplayName = None
     self.gameFSM = None
     self.links = []
     self.pendingSetupConnector = {}
     self.connectors = {}
     self.connectorInterests = set()
     self.envEffects = None
     self.spawnTriggers = []
     self.blockerColls = []
     self.islandWaterParameters = None
     self.swamp_water = None
     self.entryTime = [None, 0]
     self.timeCheck = 0
     self.minimap = None
     self.footprintNode = None
     self.popupDialog = None
     self.minimapArea = 0
     self.laMinimapObj = None
     self.footstepSound = None
     self.environment = None
     self.connectorsHereCallback = None
     return
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'GameArea')
     MappableArea.__init__(self)
     StagedObject.__init__(self, StagedObject.OFF)
     self.uniqueId = ''
     self.geom = None
     self.funnelDisplayName = None
     self.previousDisplayName = None
     self.gameFSM = None
     self.links = []
     self.pendingSetupConnector = { }
     self.connectors = { }
     self.connectorInterests = set()
     self.envEffects = None
     self.spawnTriggers = []
     self.blockerColls = []
     self.islandWaterParameters = None
     self.swamp_water = None
     self.entryTime = [
         None,
         0]
     self.timeCheck = 0
     self.minimap = None
     self.footprintNode = None
     self.popupDialog = None
     self.minimapArea = 0
     self.laMinimapObj = None
     self.footstepSound = None
     self.environment = None
     self.connectorsHereCallback = None
 def __init__(self, cr):
     # you have to initialize NodePath.__init__() here because it is
     # not called in DistributedNode.__init__()
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'player')
     
     self.player = Player(os.getenv('COMPUTERNAME'))
Example #7
0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'shop')
     self.cr = cr
     self.items = {}
     self.inShop = False
     self.clerk = None
     self.shopNP = None
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'dggflag')
     self.flagMdl = None
     self.team = None
     self.collNP = None
     self.flagCollNP = None
     self.pulseIval = None
Example #9
0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     self.barrel = loader.loadModel('phase_4/models/cogHQ/gagTank.bam')
     self.barrel.setScale(self.barrelscale)
     self.barrel.setH(180)
     self.barrel.reparentTo(self)
     self.truckId = 0
     self.barrelPosIndex = 0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     # Let the derived classes instantiate the NodePath
     self.visAvatar = None
     self.gridVisContext = None
     # Do we have grid lines visualized?
     self._onOffState = False
     if __debug__:
         self.haveGridLines = 0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     self.kart = None
     self.rope = None
     self.pod = None
     self.barrels = []
     self.numBarrels = 0
     self.triggerNP = None
     self.mg = None
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     # Let the derived classes instantiate the NodePath
     self.visAvatar = None
     self.gridVisContext = None
     # Do we have grid lines visualized?
     self._onOffState = False
     if __debug__:
         self.haveGridLines = 0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     InteractiveBase.__init__(self)
     DistributedLocatableObject.__init__(self, cr)
     GridChild.__init__(self)
     self.interactGUI = None
     self.hideHpMeterFlag = 0
     self.userId = 0
     self.uniqueId = None
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     self.kart = None
     self.rope = None
     self.pod = None
     self.barrels = []
     self.numBarrels = 0
     self.triggerNP = None
     self.mg = None
     return
Example #15
0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'shop')
     self.cr = cr
     self.items = {}
     self.destroyEvent = 'destroyShop-' + str(random.randint(0, 1000))
     self.inShop = False
     self.clerk = None
     self.shopNP = None
     return
    def __init__(self, cr):
        ExperimentBarrelBase.__init__(self)
        DistributedNode.__init__(self, cr)

        self.barrel = None
        self.icon = None
        self.collSphere = None
        self.collNode = None
        self.collNodePath = None
        self.animTrack = None
Example #17
0
 def __init__(self, cr):
     self.cr = cr
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'trolley')
     self.destination = ''
     self.filledSpots = 0
     self.leaving = False
     self.gone = False
     self.destination_lbl = None
     self.movingSfx = loader.loadSfx('phase_4/audio/sfx/SZ_trolley_away.ogg')
     self.bellSfx = loader.loadSfx('phase_4/audio/sfx/SZ_trolley_bell.ogg')
     return
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'ShipDeployer')
     self.minRadius = 0
     self.spacing = 0
     self.maxRadius = 0
     self.heading = 0
     self.minSphere = None
     self.maxSphereSoft = None
     self.maxSphereHard = None
     self.deploySpheres = []
     self.lockedMessage = 0
     self.outerBarrierState = True
Example #19
0
    def __init__(self, cr):
        try:
            self.DistributedShop_initialized
            return
        except:
            self.DistributedShop_initialized = 1

        DistributedNode.__init__(self, cr)
        NodePath.__init__(self, "shop")
        self.inShop = False
        self.snp = None
        self.clerk = None
        return
Example #20
0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'ShipDeployer')
     self.minRadius = 0
     self.spacing = 0
     self.maxRadius = 0
     self.heading = 0
     self.minSphere = None
     self.maxSphereSoft = None
     self.maxSphereHard = None
     self.deploySpheres = []
     self.lockedMessage = 0
     self.outerBarrierState = True
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'capture_point')
     self.capturePoint = None
     self.captureCircle = None
     self.aoogahSfx = None
     self.circleTrack = None
     self.circleTrackPlayRate = 1.0
     self.circleTrackDirection = 0
     self.team = None
     self.collNP = None
     self.pointCollNode = None
     self.neutralCapTexture = None
     self.redCapTexture = None
     self.blueCapTexture = None
     self.defCapTexture = None
     return
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'restock_barrel')
     self.grabSfx = None
     self.rejectSfx = None
     self.grabSoundPath = 'phase_4/audio/sfx/SZ_DD_treasure.ogg'
     self.rejectSoundPath = 'phase_4/audio/sfx/ring_miss.ogg'
     self.animTrack = None
     self.barrelScale = 0.5
     self.sphereRadius = 3.2
     self.playSoundForRemoteToons = 1
     self.barrel = None
     self.gagNode = None
     self.gagModel = None
     self.collSphere = None
     self.collNode = None
     self.collNodePath = None
     return
 def __init__(self, cr):
     DistributedEntity.__init__(self, cr)
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'restock_barrel')
     self.grabSfx = None
     self.rejectSfx = None
     self.grabSoundPath = 'phase_4/audio/sfx/SZ_DD_treasure.ogg'
     self.rejectSoundPath = 'phase_4/audio/sfx/ring_miss.ogg'
     self.animTrack = None
     self.barrelScale = 0.5
     self.radius = 1.5
     self.height = 4.275
     self.playSoundForRemoteToons = 1
     self.barrel = None
     self.gagNode = None
     self.gagModel = None
     
     # Collision nodes
     self.collSphere = None
     self.collNode = None
     self.collNodePath = None
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     
     #######################################################
     # The below attributes are required at generation time.
     #######################################################
     # The site id is the unique id associated with the data
     # for the inspection site.
     #######################################################
     self.siteId = -1
     self.zoneId = -1
     #######################################################
     self.siteData = None
     
     self.distanceTask = None
     self.interactCollSphereNP = None
     self.interactCollSphere = None
     self.identifierIcon = None
     self.floorMarker = None
     
     self.iconSequence = None
     self.fadeSequence = None
     self.text = None
Example #25
0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     self.fsm = ClassicFSM('DistributedCityCart', [State('off', self.enterOff, self.exitOff), State('pathFollow', self.enterPathFollow, self.exitPathFollow), State('collision', self.enterCollision, self.exitCollision)], 'off', 'off')
     self.fsm.enterInitialState()
     self.suitInCar = None
     self.cart = None
     self.honkSfxPath = 'phase_14/audio/sfx/cogtropolis_citycar_driveby_horn.mp3'
     self.cartModelPath = 'phase_12/models/bossbotHQ/Coggolf_cart3.bam'
     self.moPaths = ['phase_14/models/paths/ct-citycar-drivepath-1.egg',
      'phase_14/models/paths/ct-citycar-drivepath-2.egg',
      'phase_14/models/paths/ct-citycar-drivepath-3.egg',
      'phase_14/models/paths/ct-citycar-drivepath-4.egg',
      'phase_14/models/paths/ct-citycar-drivepath-5.egg',
      'phase_14/models/paths/ct-citycar-drivepath-6.egg']
     self.moPath = None
     self.soundEngineLoop = None
     self.soundDriveByHorn = None
     self.ivalTDisplace = None
     self.pathIndex = None
     self.wheelSpinTrack = None
     self.collNodePath = None
     self.soundDriveBy = None
     return
    def __init__(self, cr):
        DistributedNode.__init__(self, cr)
        NodePath.__init__(self, 'signpost')

        # Eventually we will assign a unique string to this, so that
        # all signposts have a unique collision event.
        self.collName = 'collName'

        # We want to be able to render the backside of the sign, too.
        self.setTwoSided(1)

        self.text = TextNode('text')
        self.text.setTextColor(0, 0, 1, 1)
        self.text.setCardAsMargin(0.1, 0.1, 0.1, 0.1)
        self.text.setCardColor(1, 1, 1, 1)
        self.text.setCardDecal(True)
        self.text.setShadowColor(0, 0, 0, 1)
        self.text.setShadow(0.03, 0.03)
        self.text.setAlign(TextNode.ACenter)

        self.ival = None
        self.geom = None
        self.assignText()
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     self.fsm = ClassicFSM('DistributedCityCart', [State('off', self.enterOff, self.exitOff),
      State('pathFollow', self.enterPathFollow, self.exitPathFollow),
      State('collision', self.enterCollision, self.exitCollision)], 'off', 'off')
     self.fsm.enterInitialState()
     self.suitInCar = None
     self.cart = None
     self.honkSfxPath = 'phase_14/audio/sfx/cogtropolis_citycar_driveby_horn.ogg'
     self.cartModelPath = 'phase_12/models/bossbotHQ/Coggolf_cart3.bam'
     self.moPaths = ['phase_14/models/paths/ct-citycar-drivepath-1.egg',
         'phase_14/models/paths/ct-citycar-drivepath-2.egg',
         'phase_14/models/paths/ct-citycar-drivepath-3.egg',
         'phase_14/models/paths/ct-citycar-drivepath-4.egg',
         'phase_14/models/paths/ct-citycar-drivepath-5.egg',
         'phase_14/models/paths/ct-citycar-drivepath-6.egg']
     self.moPath = None
     self.soundEngineLoop = None
     self.soundDriveByHorn = None
     self.ivalTDisplace = None
     self.pathIndex = None
     self.wheelSpinTrack = None
     self.collNodePath = None
     self.soundDriveBy = None
Example #28
0
    def __init__(self, cr):
        DistributedNode.__init__(self, cr)

        # Load up the visible representation of this avatar.
        self.model = loader.loadModel('smiley.egg')
        self.model.reparentTo(self)
Example #29
0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     self.cannon = None
     self.avatarInTurret = None
     self.owner = None
Example #30
0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     self._name = ''
     self.winCount = 0
     self.beltLevel = 0
     self.dnaString = ''
Example #31
0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     Char.Char.__init__(self)
     self.fsm = ClassicFSM.ClassicFSM('DistributedDisneyChar', [State.State('off', self.enterOff, self.exitOff), State.State('walking', self.enterWalking, self.exitWalking), State.State('')])
Example #32
0
    def __init__(self, cr):
        NodePath.__init__(self, 'DistributedCardJitsu')
        DistributedNode.__init__(self, cr)
        self.reparentTo(render)
        self.localDeck = [None] * NUM_CARDS
        self.dummyDeck = [None] * NUM_CARDS
        self.cardButtons = {}
        self.roundResults = {}
        self.winIndicators = []

        self.turnPlayed = None
        self.leaveButton = None
        self.screenText = None
        self.wantTimer = True
        self.targetCard = None
        self.otherCard = None
        self.otherTrack = 0
        self.otherReturnPos = None

        self.ourFrame = None
        self.ourDot = None

        self.opponentFrame = None
        self.opponentSkillDot = None
        self.revealSequence = None

        self.bgm = loader.loadMusic('phase_audio/bgm/game_bgm.ogg')
        self.textDisplay = TextDisplay(FONT)

        self.buttonModels = loader.loadModel(
            'phase_3.5/models/gui/inventory_gui')
        self.upButton = self.buttonModels.find('**//InventoryButtonUp')
        self.downButton = self.buttonModels.find('**/InventoryButtonDown')
        self.rolloverButton = self.buttonModels.find(
            '**/InventoryButtonRollover')

        particles = loader.loadModel('phase_3.5/models/props/suit-particles')
        snowModel = loader.loadModel('phase_13/models/props/ice_icon')
        invModel = loader.loadModel('phase_3.5/models/gui/inventory_icons')

        self.trackIcons = {
            TRACK_FIRE: particles.find('**/fire'),
            TRACK_WATER: invModel.find('**/inventory_geyser'),
            TRACK_ICE: snowModel.find('**/g1')
        }

        invModel.removeNode()
        particles.removeNode()
        snowModel.removeNode()

        self.clockNode = Timer(FONT)
        self.clockNode.setPos(1.16, 0, -.63)
        self.clockNode.setScale(0.5)
        self.clockNode.hide()
        self.fsm = ClassicFSM.ClassicFSM('CardJitsu', [
            State.State('WaitingToBegin', self.enterWaitingToBegin,
                        self.exitWaitingToBegin, ['Playing', 'GameOver']),
            State.State('Playing', self.enterPlaying, self.exitPlaying,
                        ['GameOver']),
            State.State('GameOver', self.enterGameOver, self.exitGameOver,
                        ['WaitingToBegin'])
        ], 'WaitingToBegin', 'WaitingToBegin')
        self.fsm.enterInitialState()
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     Char.Char.__init__(self)
     self.fsm = ClassicFSM.ClassicFSM('DistributedDisneyChar', [State.State('off', self.enterOff, self.exitOff),
      State.State('walking', self.enterWalking, self.exitWalking),
      State.State('')])
Example #34
0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     self.visAvatar = None
     self.gridVisContext = None
     self._onOffState = False
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     self.model = None
     self.acceptOnce("BoardAnimationDone", self.show)
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     self.visAvatar = None
     self.gridVisContext = None
     self._onOffState = False
     return
Example #37
0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'droppableCollectableObject')
     self.collSensorNodePath = None
     self.collRayNodePath = None
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self)
Example #39
0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'd_unoTable')
     self.table = None
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self, 'droppableCollectableObject')
     self.collSensorNodePath = None
     self.collRayNodePath = None
     return
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     NodePath.__init__(self)
Example #42
0
 def __init__(self, cr):
     DistributedNode.__init__(self, cr)
     self.cannon = None
     self.avatarInTurret = None
     return