2 # this is the Entity class
5 print "Entity class...more documentation to come"
9 def __init__(self
, engine
, specs
):
13 if specs
.has_key('script') and specs
['script'] != []:
15 self
.script
= engine
.readZipfile(specs
['script'])
18 print "Entity.__init__(): Couldn't find/exec script"
20 assert specs
.has_key('contents')
21 self
.name
= specs
['contents']
28 def draw(self
, engine
):
35 def event(self
, event
, data
):
37 if self
.functions
.has_key(event
):
39 self
.functions
[event
](self
, data
)
41 # print "Entity.event(): Error running event callback"
45 if __name__
== '__main__': main()