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

  1. ## Sid Meier's Civilization 4
  2. ## Copyright Firaxis Games 2005
  3. from CvPythonExtensions import *
  4. import CvUnitController
  5.  
  6. #"""
  7. #UNIT CONTROL INTERFACE
  8. #"""
  9.  
  10. #""" Global Unit controller instance. Instead of creating a new one everytime, just keep a global - saves time."""
  11. pGlobalUnitController = CvUnitController.CvUnitController()
  12.  
  13. def ProcessEvent ( argsList ): 
  14.     """Notifies a unit of a occurring event. This function returns true if it processes the given event, or false if
  15.     it does not (in which case the default processor will do something with it). """
  16.     pCyUnitEntity, iEvent = argsList
  17.     return pGlobalUnitController.ProcessEvent( pCyUnitEntity, iEvent )
  18.