本文整理匯總了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
示例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]
示例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 = []
示例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
示例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()
示例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
示例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
示例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()
示例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
示例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
示例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
示例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
示例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
示例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)
示例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