mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-11-01 01:07:54 +00:00
29 lines
840 B
Python
29 lines
840 B
Python
import Entity
|
|
|
|
class VisibilityBlocker:
|
|
|
|
def __init__(self):
|
|
self.__nextSetZoneDoneEvent = None
|
|
return
|
|
|
|
def destroy(self):
|
|
self.cancelUnblockVis()
|
|
|
|
def requestUnblockVis(self):
|
|
if self.__nextSetZoneDoneEvent is None:
|
|
self.__nextSetZoneDoneEvent = self.level.cr.getNextSetZoneDoneEvent()
|
|
self.acceptOnce(self.__nextSetZoneDoneEvent, self.okToUnblockVis)
|
|
self.level.forceSetZoneThisFrame()
|
|
return
|
|
|
|
def cancelUnblockVis(self):
|
|
if self.__nextSetZoneDoneEvent is not None:
|
|
self.ignore(self.__nextSetZoneDoneEvent)
|
|
self.__nextSetZoneDoneEvent = None
|
|
return
|
|
|
|
def isWaitingForUnblockVis(self):
|
|
return self.__nextSetZoneDoneEvent is not None
|
|
|
|
def okToUnblockVis(self):
|
|
self.cancelUnblockVis()
|