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


Python DistributedNodeAI.__init__方法代碼示例

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


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

示例1: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
 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,代碼行數:32,代碼來源:DistributedPicnicTableAI.py

示例2: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
 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,代碼行數:9,代碼來源:DistributedFishingTargetAI.py

示例3: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
    def __init__(self, air):
        try:
            self.DistributedShopAI_initialized
            return
        except:
            self.DistributedShopAI_initialized = 1

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

示例4: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
    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,代碼行數:15,代碼來源:DistributedLawnDecorAI.py

示例5: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
 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,代碼行數:49,代碼來源:DistributedCheckersAI.py

示例6: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
 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,代碼行數:25,代碼來源:DistributedPicnicTableAI.py

示例7: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
 def __init__(self, air):
     DistributedNodeAI.__init__(self, air)
     self.avatar = None
     return
開發者ID:coginvasion,項目名稱:src,代碼行數:6,代碼來源:DistributedToonCannonAI.py

示例8: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
 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 = [[0,
       0,
       0,
       0,
       0,
       0,
       0],
      [0,
       0,
       0,
       0,
       0,
       0,
       0],
      [0,
       0,
       0,
       0,
       0,
       0,
       0],
      [0,
       0,
       0,
       0,
       0,
       0,
       0],
      [0,
       0,
       0,
       0,
       0,
       0,
       0],
      [0,
       0,
       0,
       0,
       0,
       0,
       0]]
     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.winDirection = None
     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.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:Toonerz,項目名稱:Toontown-World-Online-Leak,代碼行數:79,代碼來源:DistributedFindFourAI.py

示例9: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
 def __init__(self, air):
     DistributedNodeAI.__init__(self, air)
     self.suitMgr = None
     self.tutDrop = None
     return
開發者ID:coginvasion,項目名稱:src,代碼行數:7,代碼來源:DistributedDroppableCollectableObjectAI.py

示例10: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
 def __init__(self, air):
     DistributedNodeAI.__init__(self, air)
     self.air = air
     self.plot = None
     self.ownerIndex = None
開發者ID:Teku16,項目名稱:Toontown-Crystal-Master,代碼行數:7,代碼來源:DistributedLawnDecorAI.py

示例11: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
 def __init__(self, air, modelPath, name=None, uid=None, links=[]):
     DistributedNodeAI.__init__(self, air)
     self.modelPath = modelPath
     self.links = links
     self.uid = uid
     self.name = name
開發者ID:TTGhost,項目名稱:POTCOR-src,代碼行數:8,代碼來源:DistributedGameAreaAI.py

示例12: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
 def __init__(self, mgr):
     self.mgr = mgr
     DistributedNodeAI.__init__(self, self.mgr.air)
     self.plot = 0
     self.ownerIndex = 0
開發者ID:BmanGames,項目名稱:ToontownStride,代碼行數:7,代碼來源:DistributedLawnDecorAI.py

示例13: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
 def __init__(self, air):
     DistributedNodeAI.__init__(self, air)
     self.plot = 0
     self.h = 0
     self.pos = (0, 0, 0)
     self.ownerIndex = 0
開發者ID:Toonerz,項目名稱:Toontown-World-Online-Leak,代碼行數:8,代碼來源:DistributedLawnDecorAI.py

示例14: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
 def __init__(self, air):
     DistributedNodeAI.__init__(self, air)
開發者ID:AdrianF98,項目名稱:Toontown-Rewritten,代碼行數:4,代碼來源:DistributedElectionCameraAI.py

示例15: __init__

# 需要導入模塊: from direct.distributed.DistributedNodeAI import DistributedNodeAI [as 別名]
# 或者: from direct.distributed.DistributedNodeAI.DistributedNodeAI import __init__ [as 別名]
 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 = ChineseCheckersBoard.ChineseCheckersBoard()
     self.parent = self.air.doId2do[parent]
     self.parentDo = parent
     self.wantStart = []
     self.playersPlaying = []
     self.playersSitting = 0
     self.playersTurn = 1
     self.movesMade = 0
     self.playersGamePos = [
         None,
         None,
         None,
         None,
         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,
             12,
             13,
             23,
             24,
             25,
             35,
             36,
             46],
         [
             65,
             75,
             76,
             86,
             87,
             88,
             98,
             99,
             100,
             101],
         [
             111,
             112,
             113,
             114,
             115,
             116,
             117,
             118,
             119,
             120],
         [
             74,
             84,
             85,
             95,
             96,
             97,
             107,
             108,
             109,
             110],
         [
             19,
             20,
             21,
             22,
             32,
#.........這裏部分代碼省略.........
開發者ID:Toonerz,項目名稱:Toontown-World-Online-Leaked-Source,代碼行數:103,代碼來源:DistributedChineseCheckersAI.py


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