#
# CvEventInterface.py
#
# These functions are App Entry Points from C++
# WARNING: These function names should not be changed
# WARNING: These functions can not be placed into a class
#
# No other modules should import this
#
import CvUtil
import CvRFCEventManager
import BugEventManager
from CvPythonExtensions import *

rfcEventManager = CvRFCEventManager.CvRFCEventManager()
bugEventManager = BugEventManager.BugEventManager()


def getEventManager():
    return bugEventManager


def onEvent(argsList):
    'Called when a game event happens - return 1 if the event was consumed'
    return getEventManager().handleEvent(argsList)


def applyEvent(argsList):
    context, playerID, netUserData, popupReturn = argsList
    return getEventManager().applyEvent(argsList)
Beispiel #2
0
def getEventManager(bInit=False):
    if bInit:
        import BugEventManager
        global eventManager
        eventManager = BugEventManager.BugEventManager()
    return eventManager