Table of Contents

Class: Scheduler pubcore.py

Scheduler: keeps track of the world clock, calls events, etc.

Basically, it controls 'Event's.

Appears to work on a realtime model, not sure how turns figure in.

Most actions should take 1 minute This is not true however, for some reason every time I look at a clock it take 2 minutes. I don't know why. In addition wait can take up to 15 minutes for example

for some reason it always take an extra minute for an action. could be a problem since we don't have any 12:01, 12:03 and so forth.

scheduler
keeps track of the world clock, calls events, etc.

Methods   
AddAbsEvent
AddEvent
GetTime
HasEventFor
Update
__init__
__str__
  AddAbsEvent 
AddAbsEvent (
        self,
        pAbsTime,
        pEvent,
        )

  AddEvent 
AddEvent (
        self,
        pRelTime,
        pEvent,
        )

AddEvent: Adds an event to the scheduler. pRelTime should be a number of minutes.

self.AddEvent(5, event) will add a new event 5 minutes from now.

  GetTime 
GetTime ( self )

Get the time of day

  HasEventFor 
HasEventFor ( self,  pFor )

see if the scheduler has an event for a certain object, pass this method a game object.

  Update 
Update ( self )

update the scheduler

  __init__ 
__init__ ( self,  pTimeString='12:00' )

initialization method

  __str__ 
__str__ ( self )

Tells the current time and number of events to be processed Called with str(self)


Table of Contents

This document was automatically generated on Mon Aug 8 17:04:06 2005 by HappyDoc version 2.1