当前位置: 首页>>代码示例>>Python>>正文


Python RepairMincroGame.RepairMincroGame类代码示例

本文整理汇总了Python中RepairMincroGame.RepairMincroGame的典型用法代码示例。如果您正苦于以下问题:Python RepairMincroGame类的具体用法?Python RepairMincroGame怎么用?Python RepairMincroGame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了RepairMincroGame类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _initVisuals

 def _initVisuals(self):
     RepairMincroGame._initVisuals(self)
     self.model = loader.loadModel('models/gui/pir_m_gui_srp_bracing_main')
     self.background = self.model.find('**/background')
     self.background.reparentTo(self)
     self.background.setZ(0.17499999999999999)
     self.gridParent = self.attachNewNode('gridParent')
     self.grid = []
     for xpos in range(GRID_SIZE):
         col = []
         for ypos in range(GRID_SIZE):
             allWoodSquaresGeom = NodePath('wood_squares')
             for i in range(self.model.find('**/wood_squares').getNumChildren()):
                 self.model.find('**/wood_squares').getChild(i).copyTo(allWoodSquaresGeom)
             
             tempGeom = NodePath('tempGeom')
             self.model.find('**/wood_squares').getChild(0).copyTo(tempGeom)
             selectedOutlineGeom = NodePath('selectedOutlineGeom')
             self.model.find('**/selected').copyTo(selectedOutlineGeom)
             selectedOutlineGeom.setScale(0.90000000000000002)
             piece = RepairGridPiece(name = 'piece%i' % (xpos * GRID_SIZE + ypos), parent = self.gridParent, allWoodSquaresGeom = allWoodSquaresGeom, selectedOutlineGeom = selectedOutlineGeom, scale = (0.90000000000000002, 0.90000000000000002, 0.90000000000000002), pos = (-0.22 + xpos * SPACING, 0.0, -0.029999999999999999 + ypos * SPACING), command = self.onPiecePressed, location = [
                 xpos,
                 ypos], clickSound = None, pressEffect = 0, geom = tempGeom, relief = None)
             col.append(piece)
         
         self.grid.append(col)
     
     self.createGoalPieces()
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:28,代码来源:RepairBracingGame.py

示例2: destroy

 def destroy(self):
     RepairMincroGame.destroy(self)
     for leakSet in (self.activeLeaks, self.inactiveLeaks, self.patchedLeaks):
         for i in range(len(leakSet)):
             leak = leakSet.pop()
         
     
     del self.activeLeaks
     del self.inactiveLeaks
     del self.patchedLeaks
     for locator in self.locators:
         locator.removeNode()
     
     del self.locators
     self.board.removeNode()
     del self.board
     self.crossHair.removeNode()
     del self.crossHair
     self.bucket.removeNode()
     del self.bucket
     self.bucketIdle.removeNode()
     del self.bucketIdle
     if self.missSeq is not None:
         self.missSeq.finish()
     
     del self.missSeq
     self.missPatch.removeNode()
     del self.missPatch
开发者ID:XamarinDeveloper,项目名称:Pirates-Online-Source,代码行数:28,代码来源:RepairPitchingGame.py

示例3: enterGame

 def enterGame(self):
     RepairMincroGame.enterGame(self)
     taskMgr.add(self.updateTask, 'RepairPitchingGame.updateTask')
     self.bucketPouring = False
     self.accept('mouse1', self.onMouseDown)
     self.accept('mouse1-up', self.onMouseUp)
     self.nextSpawnTime = 0.0
开发者ID:XamarinDeveloper,项目名称:Pirates-Online-Source,代码行数:7,代码来源:RepairPitchingGame.py

示例4: _initVars

 def _initVars(self):
     RepairMincroGame._initVars(self)
     self.circleDirection = GROW
     self.currentMin = 0.0
     self.nailCount = 0
     self.currentNails = []
     self.aim = 1.0
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:7,代码来源:RepairHammeringGame.py

示例5: setDifficulty

 def setDifficulty(self, difficulty):
     RepairMincroGame.setDifficulty(self, difficulty)
     percent = difficulty / self.repairGame.difficultyMax
     dif = self.config.barnacleCountRange[1] - self.config.barnacleCountRange[0]
     self.barnacleCount = int(math.floor(self.config.barnacleCountRange[0] + dif * percent))
     dif = self.config.barnacleHPScaleRange[1] - self.config.barnacleHPScaleRange[0]
     self.barnacleHPScale = self.config.barnacleHPScaleRange[0] + dif * percent
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:7,代码来源:RepairCareeningGame.py

示例6: _initVars

 def _initVars(self):
     RepairMincroGame._initVars(self)
     self.boardsPool = { }
     self.currentBoard = None
     self.currentBoardIndex = 0
     self.onDeckBoard = None
     self.onDeckBoardIndex = 0
     self.totalScore = 0.0
     self.hitZone1Penalty = False
     self.hitZone2Penalty = False
     self.hitBoardPenalty = False
     self.moveDiffForSound = 0.0
     self.startPositions = (Point3(0.0, 0.0, 0.0),)
     self.currentStartIndex = 0
     self.lastMousePos = None
     self.board_left = None
     self.board_right = None
     self.cut = None
     self.zone1_right = None
     self.zone1_left = None
     self.zone2_right = None
     self.zone2_left = None
     self.piece1 = None
     self.piece2 = None
     self.lastHitIndex = -1
     self.sawWaypoints = []
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:26,代码来源:RepairSawingGame.py

示例7: _initAudio

 def _initAudio(self):
     RepairMincroGame._initAudio(self)
     if not self.pumpDownSounds:
         RepairPumpingGame.pumpDownSounds = (loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_PUMP_DOWN01), loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_PUMP_DOWN02), loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_PUMP_DOWN03))
         RepairPumpingGame.pumpUpSounds = (loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_PUMP_UP01), loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_PUMP_UP02), loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_PUMP_UP03))
         RepairPumpingGame.pumpGoodSounds = (loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_PUMP_GOOD01), loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_PUMP_GOOD02), loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_PUMP_GOOD03), loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_PUMP_GOOD04), loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_PUMP_GOOD05), loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_PUMP_GOOD06))
         RepairPumpingGame.pumpBadSounds = (loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_PUMP_BAD),)
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:7,代码来源:RepairPumpingGame.py

示例8: destroy

 def destroy(self):
     RepairMincroGame.destroy(self)
     taskMgr.remove('SawingGame.updateSawTask')
     self.sawButton.destroy()
     self.sawButton.removeNode()
     del self.sawButton
     if self.currentBoard:
         self.currentBoard.removeNode()
         self.currentBoard = None
     
     if self.onDeckBoard:
         self.onDeckBoard.removeNode()
         self.onDeckBoard = None
     
     self.sawingLine = None
     self.progressDescriptionLabel.destroy()
     self.progressDescriptionLabel = None
     self.progressLabel.destroy()
     self.progressLabel = None
     self.boardDestroyedLabel.destroy()
     self.boardDestroyedLabel = None
     for key in self.boardsPool.keys():
         board = self.boardsPool[key]
         if not board.isEmpty():
             board.removeNode()
             continue
     
     self.boardsPool.clear()
     self.newBoardSequence.clearToInitial()
     del self.newBoardSequence
     self.splitBoardSequence.clearToInitial()
     del self.splitBoardSequence
     self.dropBoardSequence.clearToInitial()
     del self.dropBoardSequence
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:34,代码来源:RepairSawingGame.py

示例9: enterGame

 def enterGame(self):
     RepairMincroGame.enterGame(self)
     for (xpos, ypos, piece) in self.iterateCoordsAndPieces():
         if not piece.isEmptyPiece():
             piece.setEnabled(True)
             piece.request('Active')
             continue
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:7,代码来源:RepairBracingGame.py

示例10: destroy

 def destroy(self):
     RepairMincroGame.destroy(self)
     del self.currentNails
     self.board.removeNode()
     self.circle.removeNode()
     for n in self.nails:
         n.removeNode()
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:7,代码来源:RepairHammeringGame.py

示例11: _initVisuals

 def _initVisuals(self):
     RepairMincroGame._initVisuals(self)
     self.model = loader.loadModel('models/gui/pir_m_gui_srp_hammering_main')
     self.board = self.model.find('**/wood')
     self.board.reparentTo(self)
     self.board.setPos(-0.02, -2.0, 0.080000000000000002)
     self.board.setScale(1.3)
     self.board.setDepthTest(True)
     self.board.setDepthWrite(True)
     self.hammerSwinging = False
     self.nailParent = self.attachNewNode('nailParent')
     self.nails = []
     for i in range(self.config.nailCountRange[1]):
         nailModel = self.model.find('**/nail').copyTo(NodePath())
         nail = RepairNail(name = 'nail%i' % i, parent = self.nailParent, nailModel = nailModel)
         self.nails.append(nail)
     
     self.circle = aspect2d.attachNewNode('circle')
     self.circle.setHpr(0.0, 0.0, 0.0)
     self.circle.setZ(0.20000000000000001)
     self.reticleCursorPerfect = self.model.find('**/reticleCursorPerfect')
     self.reticleCursorPerfect.reparentTo(self.circle)
     self.reticleCursor = self.model.find('**/reticleCursor')
     self.reticleCursor.reparentTo(self.circle)
     self.hammer = self.model.find('**/hammerCursor')
     self.hammer.reparentTo(aspect2d)
     self.circle.stash()
     self.hammer.stash()
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:28,代码来源:RepairHammeringGame.py

示例12: exitGame

 def exitGame(self):
     RepairMincroGame.exitGame(self)
     self.ignore('mouse1')
     taskMgr.remove('RepairHammerGame.updateTask')
     taskMgr.remove('RepairHammerGame.updateCircleRadiusMin')
     self.circle.stash()
     self.hammer.stash()
     self.repairGame.mousePicker.clearCollisionMask()
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:8,代码来源:RepairHammeringGame.py

示例13: enterGame

 def enterGame(self):
     RepairMincroGame.enterGame(self)
     self.accept('mouse1', self.onMouseClick)
     self.accept('mouse1-up', self.onMouseUp)
     taskMgr.add(self.updateTask, 'RepairHammerGame.updateTask')
     self.repairGame.mousePicker.setCollisionMask(NAIL_COLLIDE_MASK)
     for n in self.currentNails:
         n.request('Active')
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:8,代码来源:RepairHammeringGame.py

示例14: exitGame

 def exitGame(self):
     RepairMincroGame.exitGame(self)
     self.sawButton.deactivate()
     self.repairGame.mousePicker.clearCollisionMask()
     taskMgr.remove('SawingGame.updateSawTask')
     self.splitBoardSequence.clearToInitial()
     self.dropBoardSequence.clearToInitial()
     localAvatar.guiMgr._showCursor()
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:8,代码来源:RepairSawingGame.py

示例15: _initAudio

 def _initAudio(self):
     RepairMincroGame._initAudio(self)
     if not self.hammerComplete:
         RepairHammeringGame.hammerComplete = loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_HAMMER_COMPLETE)
         RepairHammeringGame.weakHammerSounds = (loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_HAMMER_WEAKHIT01), loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_HAMMER_WEAKHIT02))
         RepairHammeringGame.normalHammerSounds = (loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_HAMMER_HIT01), loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_HAMMER_HIT02), loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_HAMMER_HIT03))
         RepairHammeringGame.perfectHammerSound = loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_HAMMER_PERFECT)
         RepairHammeringGame.failSound = loadSfx(SoundGlobals.SFX_MINIGAME_REPAIR_FAIL)
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:8,代码来源:RepairHammeringGame.py


注:本文中的RepairMincroGame.RepairMincroGame类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。