Mercurial > pyntnclick
comparison gamelib/scenes/bridge.py @ 424:8d8ccae862ee
Animated starfield for bridge
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sat, 28 Aug 2010 23:19:20 +0200 |
parents | 14761edcccad |
children | dabc9d15c18c |
comparison
equal
deleted
inserted
replaced
423:fc36fb0937a6 | 424:8d8ccae862ee |
---|---|
56 self.add_thing(StethoscopeThing()) | 56 self.add_thing(StethoscopeThing()) |
57 self.add_thing(BridgeComputer()) | 57 self.add_thing(BridgeComputer()) |
58 self.add_thing(LeftLights()) | 58 self.add_thing(LeftLights()) |
59 self.add_thing(RightLights()) | 59 self.add_thing(RightLights()) |
60 self.add_thing(JimPanel()) | 60 self.add_thing(JimPanel()) |
61 self.add_thing(StarField()) | |
61 self.add_thing(GenericDescThing('bridge.wires', 1, | 62 self.add_thing(GenericDescThing('bridge.wires', 1, |
62 "The brightly coloured wires contrast with the drab walls.", | 63 "The brightly coloured wires contrast with the drab walls.", |
63 ((46, 4, 711, 143),))) | 64 ((46, 4, 711, 143),))) |
64 self.add_thing(GenericDescThing('bridge.note', 2, | 65 self.add_thing(GenericDescThing('bridge.note', 2, |
65 "\"Dammit JIM, I'm a doctor, not an engineer!\"", | 66 "\"Dammit JIM, I'm a doctor, not an engineer!\"", |
240 self.state.add_inventory_item('superconductor') | 241 self.state.add_inventory_item('superconductor') |
241 self.state.current_scene.things['bridge.massagechair_base'] \ | 242 self.state.current_scene.things['bridge.massagechair_base'] \ |
242 .set_data('contains_superconductor', False) | 243 .set_data('contains_superconductor', False) |
243 self.scene.remove_thing(self) | 244 self.scene.remove_thing(self) |
244 return Result("The superconductor module unclips easily.") | 245 return Result("The superconductor module unclips easily.") |
246 | |
247 class StarField(Thing): | |
248 | |
249 NAME = 'bridge.stars' | |
250 | |
251 INTERACTS = { | |
252 'stars' : InteractAnimated(185, 145, | |
253 ['stars_%d.png' % (i+1) for i in range(3) + range(1,0,-1)], 30) | |
254 } | |
255 | |
256 INITIAL = 'stars' | |
257 | |
258 def is_interactive(self): | |
259 return False | |
260 | |
245 | 261 |
246 class BlinkingLights(Thing): | 262 class BlinkingLights(Thing): |
247 | 263 |
248 def __init__(self): | 264 def __init__(self): |
249 super(BlinkingLights, self).__init__() | 265 super(BlinkingLights, self).__init__() |