home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 January / Gamestar_80_2006-01_dvd.iso / Dema / Civilization4 / data1.cab / Civ4DemoComponent / Assets / Python / EntryPoints / CvEventInterface.py < prev    next >
Encoding:
Python Source  |  2005-11-09  |  862 b   |  31 lines

  1. # Sid Meier's Civilization 4
  2. # Copyright Firaxis Games 2005
  3. #
  4. # CvEventInterface.py
  5. #
  6. # These functions are App Entry Points from C++
  7. # WARNING: These function names should not be changed
  8. # WARNING: These functions can not be placed into a class
  9. #
  10. # No other modules should import this
  11. #
  12. import CvUtil
  13. import CvEventManager
  14. from CvPythonExtensions import *
  15.  
  16. normalEventManager = CvEventManager.CvEventManager()
  17.  
  18. def getEventManager():
  19.     return normalEventManager
  20.  
  21. def onEvent(argsList):
  22.     'Called when a game event happens - return 1 if the event was consumed'
  23.     return getEventManager().handleEvent(argsList)
  24.  
  25. def applyEvent(argsList):
  26.     context, playerID, netUserData, popupReturn = argsList
  27.     return getEventManager().applyEvent(argsList)
  28.  
  29. def beginEvent(context, argsList=-1):
  30.     return getEventManager().beginEvent(context, argsList)
  31.