本文整理匯總了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
示例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]
示例3: delete
def delete(self):
self.fsm.requestFinalState()
self.parent = None
self.parentDo = None
del self.board
del self.fsm
DistributedNodeAI.delete(self)
示例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
示例5: delete
def delete(self):
self.numBarrels = None
self.mg = None
self.index = None
self.hasReportedAllGone = None
DistributedNodeAI.delete(self)
return
示例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
示例7: __init__
def __init__(self, air):
try:
self.DistributedShopAI_initialized
return
except:
self.DistributedShopAI_initialized = 1
DistributedNodeAI.__init__(self, air)
self.avatars = []
示例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())
示例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
示例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()
示例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
示例12: __init__
def __init__(self, mgr):
self.mgr = mgr
DistributedNodeAI.__init__(self, self.mgr.air)
self.plot = 0
self.ownerIndex = 0
示例13: delete
def delete(self):
DistributedNodeAI.delete(self)
self.game = None
self.gameDoId = None
return
示例14: delete
def delete(self):
taskMgr.remove('updateFishingTarget%d' % self.doId)
DistributedNodeAI.delete(self)
示例15: delete
def delete(self):
self.fsm.requestFinalState()
self.board.delete()
del self.fsm
DistributedNodeAI.delete(self)