2015-03-03 16:10:12 -06:00
|
|
|
from direct.directnotify import DirectNotifyGlobal
|
|
|
|
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
|
|
|
|
|
|
|
class DistributedGardenAI(DistributedObjectAI):
|
|
|
|
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedGardenAI")
|
|
|
|
|
2015-05-10 07:00:38 -05:00
|
|
|
def __init__(self, air):
|
2015-05-12 15:52:38 -05:00
|
|
|
DistributedObjectAI.__init__(self, air)
|
2015-05-10 07:00:38 -05:00
|
|
|
self.air = air
|
|
|
|
self.props = []
|
|
|
|
|
2015-05-12 15:52:38 -05:00
|
|
|
def generate(self):
|
|
|
|
DistributedObjectAI.generate(self)
|
|
|
|
|
|
|
|
def announceGenerate(self):
|
|
|
|
DistributedObjectAI.announceGenerate(self)
|
|
|
|
|
|
|
|
def disable(self):
|
|
|
|
DistributedObjectAI.disable(self)
|
|
|
|
|
|
|
|
def delete(self):
|
|
|
|
DistributedObjectAI.delete(self)
|
|
|
|
|
|
|
|
def setProps(self, props):
|
|
|
|
self.props = props
|
2015-05-12 15:58:12 -05:00
|
|
|
|
|
|
|
def d_sendNewProp(self, prop, x, y, z):
|
|
|
|
self.sendUpdate('sendNewProp', [prop, x, y, z])
|