comparison gamelib/scenes/bridge.py @ 235:b0add10f7556

Hook up bridge
author Stefano Rivera <stefano@rivera.za.net>
date Fri, 27 Aug 2010 00:14:01 +0200
parents b03debaec72d
children ae01c10497b3
comparison
equal deleted inserted replaced
234:017ee5c31ba0 235:b0add10f7556
1 """Bridge where the final showdown with the AI occurs.""" 1 """Bridge where the final showdown with the AI occurs."""
2 2
3 from gamelib.cursor import CursorSprite 3 from gamelib.cursor import CursorSprite
4 from gamelib.state import Scene, Item, Thing, Result, InteractText 4 from gamelib.state import Scene, Item, Thing, Result, InteractText, \
5 InteractNoImage, InteractRectUnion
5 6
6 class Bridge(Scene): 7 class Bridge(Scene):
7 8
8 FOLDER = "bridge" 9 FOLDER = "bridge"
9 BACKGROUND = None # TODO 10 BACKGROUND = 'bridge.png'
10 11
11 INITIAL_DATA = { 12 INITIAL_DATA = {
12 'accessible': True, 13 'accessible': True,
13 } 14 }
14 15
29 30
30 NAME = "bridge.tomap" 31 NAME = "bridge.tomap"
31 DEST = "map" 32 DEST = "map"
32 33
33 INTERACTS = { 34 INTERACTS = {
34 "door": InteractText(100, 200, "To Map"), 35 "door": InteractNoImage(707, 344, 84, 245),
35 } 36 }
36 37
37 INITIAL = "door" 38 INITIAL = "door"
38 39
39 def interact_without(self): 40 def interact_without(self):
45 "The captain's massage chair, contains superconductor" 46 "The captain's massage chair, contains superconductor"
46 47
47 NAME = 'bridge.massagechair' 48 NAME = 'bridge.massagechair'
48 49
49 INTERACTS = { 50 INTERACTS = {
50 'chair': InteractText(200, 200, 'Chair'), 51 'chair': InteractRectUnion((
52 (76, 365, 72, 216),
53 (148, 486, 160, 97),
54 (148, 418, 77, 68),
55 )),
51 } 56 }
52 57
53 INITIAL = 'chair' 58 INITIAL = 'chair'
54 59
55 INITIAL_DATA = { 60 INITIAL_DATA = {
76 "Stehoscope on the doctor" 81 "Stehoscope on the doctor"
77 82
78 NAME ='bridge.stethoscope' 83 NAME ='bridge.stethoscope'
79 84
80 INTERACTS = { 85 INTERACTS = {
81 'stethoscope': InteractText(300, 200, 'Stethoscope'), 86 'stethoscope': InteractNoImage(643, 177, 57, 87),
82 } 87 }
83 88
84 INITIAL = 'stethoscope' 89 INITIAL = 'stethoscope'
85 90
86 def interact_without(self): 91 def interact_without(self):