Poodletooth-iLand/toontown/safezone/SafeZoneManagerAI.py
Master Jumblespeed d882959bfa switch to remote
2015-05-18 22:11:33 -04:00

23 lines
678 B
Python
Executable file

from direct.directnotify.DirectNotifyGlobal import *
from direct.distributed import DistributedObjectAI
HealFrequency = 10.0 # The time in seconds between each Toon-up pulse.
class SafeZoneManagerAI(DistributedObjectAI.DistributedObjectAI):
notify = directNotify.newCategory('SafeZoneManagerAI')
def enterSafeZone(self):
avId = self.air.getAvatarIdFromSender()
av = self.air.doId2do.get(avId)
if not av:
return
av.startToonUp(HealFrequency)
def exitSafeZone(self):
avId = self.air.getAvatarIdFromSender()
av = self.air.doId2do.get(avId)
if not av:
return
av.stopToonUp()