starting bossBattle

This commit is contained in:
David Rose 2003-10-31 23:45:22 +00:00
parent d37da1df2e
commit 1fd98e38f1

View File

@ -53,6 +53,9 @@ class DistributedObject(PandaObject):
self.__nextContext = 0
self.__callbacks = {}
# This is used by doneBarrier().
self.__barrierContext = None
return None
#def __del__(self):
@ -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