Changeset 602 for trunk/game/scripts/objects
- Timestamp:
- 07/28/10 19:10:36 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/game/scripts/objects/action.py
r601 r602 177 177 print action_text 178 178 179 class ExamineItemAction(Action): 180 """Examine an item.""" 181 def __init__(self, controller, examine_name, examine_desc, commands = None): 182 """ 183 @param controller: A reference to the GameSceneController. 184 @type controller: scripts.GameSceneController 185 @param commands: Special commands that are executed 186 @type commands: Dictionary 187 @type view: class derived from scripts.ViewBase 188 @param view: The view 189 @type examine_name: String 190 @param examine_name: Name of the object to be examined. 191 @type examine_name: String 192 @param examine_name: Description of the object to be examined. 193 """ 194 super(ExamineItemAction, self).__init__(controller, commands) 195 self.view = controller.view 196 self.examine_name = examine_name 197 self.examine_desc = examine_desc 198 199 def execute(self): 200 """Display the text.""" 201 action_text = unicode(self.examine_desc) 202 self.view.hud.addAction(action_text) 203 print action_text 204 179 205 class ReadAction(Action): 180 206 """Read a text.""" … … 349 375 "Unlock":UnlockBoxAction, 350 376 "Lock":LockBoxAction, 377 "ExamineItem":ExamineItemAction, 351 378 "Examine":ExamineAction, 352 "Look":Examine Action,379 "Look":ExamineItemAction, 353 380 "Read":ReadAction, 354 381 "Talk":TalkAction,
Note: See TracChangeset
for help on using the changeset viewer.