diff src/parpg/controllerbase.py @ 30:94cb5843dcbb

Modifications to use the grease manager and modes
author KarstenBock@gmx.net
date Tue, 12 Jul 2011 12:31:53 +0200
parents d60f1dab8469
children 29869273f9e1
line wrap: on
line diff
--- a/src/parpg/controllerbase.py	Tue Jul 12 12:30:41 2011 +0200
+++ b/src/parpg/controllerbase.py	Tue Jul 12 12:31:53 2011 +0200
@@ -17,8 +17,9 @@
 from parpg.common.listeners.key_listener import KeyListener
 from parpg.common.listeners.mouse_listener import MouseListener
 from parpg.common.listeners.command_listener import CommandListener
+from parpg.world import World
 
-class ControllerBase(KeyListener, MouseListener, CommandListener):
+class ControllerBase(World, KeyListener, MouseListener, CommandListener):
     """Base of Controllers"""
     def __init__(self, 
                  engine, 
@@ -41,6 +42,7 @@
         KeyListener.__init__(self, application.event_listener)        
         MouseListener.__init__(self, application.event_listener)
         CommandListener.__init__(self, application.event_listener)
+        World.__init__(self)
         self.engine = engine
         self.event_manager = engine.getEventManager()
         self.view = view
@@ -85,12 +87,4 @@
         image =  '/'.join(['gui/cursors/',
                            self.model.settings.parpg.CursorDefault])
         self.setMouseCursor(image, image)
-        
-    def onStop(self):
-        """Called when the controller is removed from the list"""
-        pass 
-                
-    def pump(self):
-        """This method gets called every frame"""
-        pass