Mercurial > boomslang
comparison gamelib/scenes/cryo.py @ 39:088a101f5b94
Add an example Thing to cryo scene.
author | Simon Cross <hodgestar+bzr@gmail.com> |
---|---|
date | Sun, 22 Aug 2010 22:07:45 +0200 |
parents | ebc76bc0c067 |
children | ad6f56bfa8b7 |
comparison
equal
deleted
inserted
replaced
38:f9abcfb2e475 | 39:088a101f5b94 |
---|---|
1 from gamelib.state import Scene, Item | 1 """Cryo room where the prisoner starts out.""" |
2 | |
3 from gamelib.state import Scene, Item, Thing | |
4 | |
2 | 5 |
3 class Cryo(Scene): | 6 class Cryo(Scene): |
4 | 7 |
5 FOLDER = "cryo" | 8 FOLDER = "cryo" |
6 BACKGROUND = "cryo_room.png" | 9 BACKGROUND = "cryo_room.png" |
7 | 10 |
8 def __init__(self, state): | 11 def __init__(self, state): |
9 super(Cryo, self).__init__(state) | 12 super(Cryo, self).__init__(state) |
10 self.add_item(Triangle("triangle")) | 13 self.add_item(Triangle("triangle")) |
11 self.add_item(Square("square")) | 14 self.add_item(Square("square")) |
15 self.add_thing(CryoUnitAlpha("cryo.unit.1", (20, 20, 400, 500))) | |
12 | 16 |
13 | 17 |
14 class Triangle(Item): | 18 class Triangle(Item): |
15 | |
16 INVENTORY_IMAGE = "triangle.png" | 19 INVENTORY_IMAGE = "triangle.png" |
17 | 20 |
18 | 21 |
19 class Square(Item): | 22 class Square(Item): |
20 | |
21 INVENTORY_IMAGE = "square.png" | 23 INVENTORY_IMAGE = "square.png" |
22 | 24 |
23 | 25 |
26 class CryoUnitAlpha(Thing): | |
27 pass | |
28 | |
29 | |
24 SCENES = [Cryo] | 30 SCENES = [Cryo] |