changeset 424:8d8ccae862ee

Animated starfield for bridge
author Neil Muller <neil@dip.sun.ac.za>
date Sat, 28 Aug 2010 23:19:20 +0200
parents fc36fb0937a6
children 7907cd46c206
files gamelib/scenes/bridge.py
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/scenes/bridge.py	Sat Aug 28 23:17:08 2010 +0200
+++ b/gamelib/scenes/bridge.py	Sat Aug 28 23:19:20 2010 +0200
@@ -58,6 +58,7 @@
         self.add_thing(LeftLights())
         self.add_thing(RightLights())
         self.add_thing(JimPanel())
+        self.add_thing(StarField())
         self.add_thing(GenericDescThing('bridge.wires', 1,
             "The brightly coloured wires contrast with the drab walls.",
             ((46, 4, 711, 143),)))
@@ -243,6 +244,21 @@
         self.scene.remove_thing(self)
         return Result("The superconductor module unclips easily.")
 
+class StarField(Thing):
+
+    NAME = 'bridge.stars'
+
+    INTERACTS = {
+            'stars' : InteractAnimated(185, 145,
+                ['stars_%d.png' % (i+1) for i in range(3) + range(1,0,-1)], 30)
+            }
+
+    INITIAL = 'stars'
+
+    def is_interactive(self):
+        return False
+
+
 class BlinkingLights(Thing):
 
     def __init__(self):