2019-11-08 22:55:55 -06:00
|
|
|
from direct.directnotify import DirectNotifyGlobal
|
2024-07-14 15:28:28 -05:00
|
|
|
from direct.distributed import DistributedObjectAI
|
2019-11-08 22:55:55 -06:00
|
|
|
|
2024-07-14 15:28:28 -05:00
|
|
|
class DistributedScavengerHuntTargetAI(DistributedObjectAI.DistributedObjectAI):
|
|
|
|
"""
|
|
|
|
This class is instanced several times by ScavengerHuntManagerAI. Each one sits in
|
|
|
|
in its assigned zone and listens for an event on the client
|
|
|
|
"""
|
|
|
|
|
|
|
|
notify = DirectNotifyGlobal.directNotify.newCategory(
|
|
|
|
'DistributedScavengerHuntTargetAI')
|
|
|
|
|
|
|
|
def __init__(self, air, hunt, goal, shMgr):
|
|
|
|
DistributedObjectAI.DistributedObjectAI.__init__(self, air)
|
|
|
|
self.goal = goal
|
|
|
|
self.shMgr = shMgr
|
|
|
|
|
|
|
|
def attemptScavengerHunt(self):
|
|
|
|
avId = self.air.getAvatarIdFromSender()
|
|
|
|
self.shMgr.avatarAttemptingGoal(avId, self.goal)
|
|
|
|
|