當前位置: 首頁>>代碼示例>>Python>>正文


Python DistributedNodeAI.DistributedNodeAI類代碼示例

本文整理匯總了Python中direct.distributed.DistributedNodeAI.DistributedNodeAI的典型用法代碼示例。如果您正苦於以下問題:Python DistributedNodeAI類的具體用法?Python DistributedNodeAI怎麽用?Python DistributedNodeAI使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了DistributedNodeAI類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: delete

 def delete(self):
     self.fsm.requestFinalState()
     self.board.delete()
     self.playerSeatPos = None
     del self.fsm
     DistributedNodeAI.delete(self)
     return
開發者ID:Toonerz,項目名稱:Possible-Toontown-Online-Source,代碼行數:7,代碼來源:DistributedChineseCheckersAI.py

示例2: __init__

 def __init__(self, air):
     DistributedNodeAI.__init__(self, air)
     self.pondId = 0
     self.angle = 0
     self.targetRadius = 0
     self.time = 0
     self.centerPoint = [0, 0, 0]
開發者ID:ToontownBattlefront,項目名稱:Toontown-Battlefront,代碼行數:7,代碼來源:DistributedFishingTargetAI.py

示例3: delete

 def delete(self):
     self.fsm.requestFinalState()
     self.parent = None
     self.parentDo = None
     del self.board
     del self.fsm
     DistributedNodeAI.delete(self)
開發者ID:Toonerz,項目名稱:Toontown-World-Online-Leak,代碼行數:7,代碼來源:DistributedFindFourAI.py

示例4: __init__

 def __init__(self, air, zone, name, x, y, z, h, p, r):
     DistributedNodeAI.__init__(self, air)
     self.name = name
     self.air = air
     self.seats = [None,
      None,
      None,
      None,
      None,
      None]
     self.setPos(x, y, z)
     self.setHpr(h, p, r)
     self.playersSitting = 0
     self.myPos = (x, y, z)
     self.myHpr = (h, p, r)
     self.playerIdList = []
     self.checkersZoneId = None
     self.generateOtpObject(air.districtId, zone, optionalFields=['setX',
      'setY',
      'setZ',
      'setH',
      'setP',
      'setR'])
     self.observers = []
     self.allowPickers = []
     self.hasPicked = False
     self.game = None
     self.gameDoId = None
     self.isAccepting = True
     return
開發者ID:Toonerz,項目名稱:Possible-Toontown-Online-Source,代碼行數:30,代碼來源:DistributedPicnicTableAI.py

示例5: delete

 def delete(self):
     self.numBarrels = None
     self.mg = None
     self.index = None
     self.hasReportedAllGone = None
     DistributedNodeAI.delete(self)
     return
開發者ID:coginvasion,項目名稱:src,代碼行數:7,代碼來源:DistributedDeliveryTruckAI.py

示例6: delete

 def delete(self):
     if self.getSuitManager():
         if self.getSuitManager().getDrops():
             self.getSuitManager().getDrops().remove(self)
     self.suitMgr = None
     self.tutDrop = None
     DistributedNodeAI.delete(self)
     return
開發者ID:coginvasion,項目名稱:src,代碼行數:8,代碼來源:DistributedDroppableCollectableObjectAI.py

示例7: __init__

    def __init__(self, air):
        try:
            self.DistributedShopAI_initialized
            return
        except:
            self.DistributedShopAI_initialized = 1

        DistributedNodeAI.__init__(self, air)
        self.avatars = []
開發者ID:coginvasion,項目名稱:src,代碼行數:9,代碼來源:DistributedShopAI.py

示例8: generate

 def generate(self):
     DistributedNodeAI.generate(self)
     self.updateState()
     if not self.pondId:
         #We dont have a pond ID for some reason...
         return
     pond = self.air.doId2do[self.pondId]
     pond.addTarget(self)
     self.centerPoint = FishingTargetGlobals.getTargetCenter(pond.getArea())
開發者ID:ToontownBattlefront,項目名稱:Toontown-Battlefront,代碼行數:9,代碼來源:DistributedFishingTargetAI.py

示例9: __init__

    def __init__(self, air, gardenManager, ownerIndex):
        DistributedNodeAI.__init__(self, air)

        self.gardenManager = gardenManager
        self.ownerIndex = ownerIndex

        self.plotIndex = None
        self.plotType = None

        self.pos = None
        self.heading = None

        self.movie = None
開發者ID:nate97,項目名稱:src,代碼行數:13,代碼來源:DistributedLawnDecorAI.py

示例10: __init__

 def __init__(self, air, parent, name, x, y, z, h, p, r):
     DistributedNodeAI.__init__(self, air)
     self.name = name
     self.air = air
     self.setPos(x, y, z)
     self.setHpr(h, p, r)
     self.myPos = (x, y, z)
     self.myHpr = (h, p, r)
     self.board = CheckersBoard.CheckersBoard()
     self.parent = self.air.doId2do[parent]
     self.parentDo = parent
     self.wantStart = []
     self.playersPlaying = []
     self.playersSitting = 0
     self.playersTurn = 1
     self.movesMade = 0
     self.playerNum = 1
     self.hasWon = False
     self.playersGamePos = [None, None]
     self.wantTimer = True
     self.timerEnd = 0
     self.turnEnd = 0
     self.playersObserving = []
     self.winLaffPoints = 20
     self.movesRequiredToWin = 10
     self.zoneId = self.air.allocateZone()
     self.generateOtpObject(
         air.districtId, self.zoneId, optionalFields=["setX", "setY", "setZ", "setH", "setP", "setR"]
     )
     self.parent.setCheckersZoneId(self.zoneId)
     self.startingPositions = [
         [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
         [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31],
     ]
     self.kingPositions = [[31, 30, 29, 28], [0, 1, 2, 3]]
     self.timerStart = None
     self.fsm = ClassicFSM.ClassicFSM(
         "Checkers",
         [
             State.State("waitingToBegin", self.enterWaitingToBegin, self.exitWaitingToBegin, ["playing"]),
             State.State("playing", self.enterPlaying, self.exitPlaying, ["gameOver"]),
             State.State("gameOver", self.enterGameOver, self.exitGameOver, ["waitingToBegin"]),
         ],
         "waitingToBegin",
         "waitingToBegin",
     )
     self.fsm.enterInitialState()
開發者ID:BmanGames,項目名稱:ToontownStride,代碼行數:47,代碼來源:DistributedCheckersAI.py

示例11: __init__

 def __init__(self, air, zone, name, x, y, z, h, p, r):
     DistributedNodeAI.__init__(self, air)
     self.name = name
     self.zoneId = zone
     self.air = air
     self.seats = [
         None,
         None,
         None,
         None,
         None,
         None]
     self.setPos(x, y, z)
     self.setHpr(h, p, r)
     self.playersSitting = 0
     self.playerIdList = []
     self.checkersZoneId = None
     self.observers = []
     self.allowPickers = []
     self.hasPicked = False
     self.game = None
     self.gameDoId = None
     self.isAccepting = True
開發者ID:Grant11,項目名稱:mf0DJnN,代碼行數:23,代碼來源:DistributedPicnicTableAI.py

示例12: __init__

 def __init__(self, mgr):
     self.mgr = mgr
     DistributedNodeAI.__init__(self, self.mgr.air)
     self.plot = 0
     self.ownerIndex = 0
開發者ID:BmanGames,項目名稱:ToontownStride,代碼行數:5,代碼來源:DistributedLawnDecorAI.py

示例13: delete

 def delete(self):
     DistributedNodeAI.delete(self)
     self.game = None
     self.gameDoId = None
     return
開發者ID:Toonerz,項目名稱:Possible-Toontown-Online-Source,代碼行數:5,代碼來源:DistributedPicnicTableAI.py

示例14: delete

    def delete(self):
        taskMgr.remove('updateFishingTarget%d' % self.doId)

        DistributedNodeAI.delete(self)
開發者ID:ToontownBattlefront,項目名稱:Toontown-Battlefront,代碼行數:4,代碼來源:DistributedFishingTargetAI.py

示例15: delete

 def delete(self):
     self.fsm.requestFinalState()
     self.board.delete()
     del self.fsm
     DistributedNodeAI.delete(self)
開發者ID:Toonerz,項目名稱:Toontown-World-Online-Leak,代碼行數:5,代碼來源:DistributedCheckersAI.py


注:本文中的direct.distributed.DistributedNodeAI.DistributedNodeAI類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。