comparison gamescenecontroller.py @ 188:2a12e2843984

Removed bGrease, which is in a seperate repository, here: https://github.com/Beliaar/bGrease
author Beliar <KarstenBock@gmx.net>
date Tue, 27 Mar 2012 13:41:20 +0200
parents ab6a0fd1668a
children 4381be70e1bb
comparison
equal deleted inserted replaced
187:ab6a0fd1668a 188:2a12e2843984
33 OpenAction, CloseAction, UnlockAction, LockAction, 33 OpenAction, CloseAction, UnlockAction, LockAction,
34 PickUpAction, DropItemAction, 34 PickUpAction, DropItemAction,
35 ExamineContentsAction, 35 ExamineContentsAction,
36 ) 36 )
37 37
38 from parpg.world import World 38 from parpg.world import PARPGWorld
39 39
40 #For debugging/code analysis 40 #For debugging/code analysis
41 if False: 41 if False:
42 from gamesceneview import GameSceneView 42 from gamesceneview import GameSceneView
43 from gamemodel import GameModel 43 from gamemodel import GameModel
44 from parpg import PARPGApplication 44 from parpg import PARPGApplication
45 45
46 46
47 logger = logging.getLogger('gamescenecontroller') 47 logger = logging.getLogger('gamescenecontroller')
48 48
49 class GameSceneController(World, ControllerBase): 49 class GameSceneController(PARPGWorld, ControllerBase):
50 ''' 50 '''
51 This controller handles inputs when the game is in "scene" state. 51 This controller handles inputs when the game is in "scene" state.
52 "Scene" state is when the player can move around and interact 52 "Scene" state is when the player can move around and interact
53 with objects. Like, talking to a npc or examining the contents of a box. 53 with objects. Like, talking to a npc or examining the contents of a box.
54 ''' 54 '''
71 ControllerBase.__init__(self, 71 ControllerBase.__init__(self,
72 engine, 72 engine,
73 view, 73 view,
74 model, 74 model,
75 application) 75 application)
76 World.__init__(self) 76 PARPGWorld.__init__(self)
77 77
78 #setup functions for the GameEnvironment 78 #setup functions for the GameEnvironment
79 createItemByID = lambda identifier : ( 79 createItemByID = lambda identifier : (
80 self.model.createItemByID( 80 self.model.createItemByID(
81 identifier=identifier, 81 identifier=identifier,
588 # uncomment to instrument 588 # uncomment to instrument
589 # t0 = time.time() 589 # t0 = time.time()
590 if self.paused: 590 if self.paused:
591 return 591 return
592 ControllerBase.pump(self, dt) 592 ControllerBase.pump(self, dt)
593 World.pump(self, dt) 593 PARPGWorld.pump(self, dt)
594 self.updateMouse() 594 self.updateMouse()
595 if self.model.active_map: 595 if self.model.active_map:
596 self.view.highlightFrontObject(self.last_mousecoords) 596 self.view.highlightFrontObject(self.last_mousecoords)
597 self.view.refreshTopLayerTransparencies() 597 self.view.refreshTopLayerTransparencies()
598 self.handleScrolling() 598 self.handleScrolling()