mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
starting bossBattle
This commit is contained in:
parent
d37da1df2e
commit
1fd98e38f1
@ -52,6 +52,9 @@ class DistributedObject(PandaObject):
|
||||
# These are used by getCallbackContext() and doCallbackContext().
|
||||
self.__nextContext = 0
|
||||
self.__callbacks = {}
|
||||
|
||||
# This is used by doneBarrier().
|
||||
self.__barrierContext = None
|
||||
|
||||
return None
|
||||
|
||||
@ -291,3 +294,18 @@ class DistributedObject(PandaObject):
|
||||
else:
|
||||
self.notify.warning("Got unexpected context from AI: %s" % (context))
|
||||
|
||||
def doBarrierWait(self, context):
|
||||
# This message is sent by the AI to tell us the context number
|
||||
# for the current barrier. When the client is done handling
|
||||
# whatever it should handle in its current state, it should
|
||||
# call doneBarrier(), which will send the context number back
|
||||
# to the AI.
|
||||
self.__barrierContext = context
|
||||
|
||||
def doneBarrier(self):
|
||||
# Tells the AI we have finished handling our task.
|
||||
assert(self.__barrierContext != None)
|
||||
self.sendUpdate("doBarrierReady", [self.__barrierContext])
|
||||
self.__barrierContext = None
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user