mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-27 13:42:28 -06:00
33 lines
1 KiB
Python
33 lines
1 KiB
Python
|
from otp.ai.AIBase import *
|
||
|
from direct.directnotify import DirectNotifyGlobal
|
||
|
from otp.level import DistributedEntityAI
|
||
|
import StomperGlobals
|
||
|
from direct.distributed import ClockDelta
|
||
|
|
||
|
class DistributedStomperPairAI(DistributedEntityAI.DistributedEntityAI):
|
||
|
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedStomperAI')
|
||
|
|
||
|
def __init__(self, level, entId):
|
||
|
DistributedEntityAI.DistributedEntityAI.__init__(self, level, entId)
|
||
|
self.stompers = [None, None]
|
||
|
self.hitPtsTaken = 3
|
||
|
return
|
||
|
|
||
|
def generate(self):
|
||
|
DistributedEntityAI.DistributedEntityAI.generate(self)
|
||
|
|
||
|
def delete(self):
|
||
|
DistributedEntityAI.DistributedEntityAI.delete(self)
|
||
|
|
||
|
def setChildren(self, doIds):
|
||
|
for id in doIds:
|
||
|
self.children = simbase.air.doId2do[id]
|
||
|
|
||
|
self.sendUpdate('setChildren', [doIds])
|
||
|
|
||
|
def setSquash(self):
|
||
|
avId = self.air.getAvatarIdFromSender()
|
||
|
av = simbase.air.doId2do.get(avId)
|
||
|
if av:
|
||
|
av.takeDamage(self.hitPtsTaken)
|