2015-03-03 16:10:12 -06:00
|
|
|
from direct.directnotify import DirectNotifyGlobal
|
|
|
|
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
|
|
|
|
|
|
|
class DistributedKartPadAI(DistributedObjectAI):
|
|
|
|
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedKartPadAI")
|
2015-06-16 12:26:44 -05:00
|
|
|
|
2015-03-03 16:10:12 -06:00
|
|
|
def __init__(self, air):
|
|
|
|
DistributedObjectAI.__init__(self, air)
|
|
|
|
self.air = air
|
|
|
|
self.startingBlocks = []
|
|
|
|
self.area = None
|
2015-06-16 12:26:44 -05:00
|
|
|
|
2015-03-03 16:10:12 -06:00
|
|
|
def setArea(self, area):
|
|
|
|
self.area = area
|
2015-06-16 12:26:44 -05:00
|
|
|
|
2015-03-03 16:10:12 -06:00
|
|
|
def d_setArea(self, area):
|
|
|
|
self.sendUpdate('setArea', [area])
|
2015-06-16 12:26:44 -05:00
|
|
|
|
2015-03-03 16:10:12 -06:00
|
|
|
def b_setArea(self, area):
|
|
|
|
self.setArea(area)
|
|
|
|
self.d_setArea(self, area)
|
2015-06-16 12:26:44 -05:00
|
|
|
|
2015-03-03 16:10:12 -06:00
|
|
|
def getArea(self):
|
|
|
|
return self.area
|
|
|
|
|
|
|
|
def addStartingBlock(self, block):
|
|
|
|
self.startingBlocks.append(block)
|
2015-06-16 12:26:44 -05:00
|
|
|
|
2015-03-03 16:10:12 -06:00
|
|
|
def updateMovieState(self):
|
|
|
|
pass
|
2015-06-16 12:26:44 -05:00
|
|
|
|
2015-03-03 16:10:12 -06:00
|
|
|
def removeStartingBlock(self, block):
|
|
|
|
if self.startingBlocks.count(block):
|
|
|
|
self.startingBlocks.remove(block)
|