Mercurial > skaapsteker
comparison skaapsteker/cutscene.py @ 503:d9b70b89cca6
Update help
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 09 Apr 2011 23:09:29 +0200 |
parents | 069fc6312ab8 |
children | e648501c2eea |
comparison
equal
deleted
inserted
replaced
502:e1436dacca69 | 503:d9b70b89cca6 |
---|---|
38 if self._background_music: | 38 if self._background_music: |
39 self._soundsystem.play_background_music(self._background_music) | 39 self._soundsystem.play_background_music(self._background_music) |
40 | 40 |
41 | 41 |
42 class TextCutScene(CutScene): | 42 class TextCutScene(CutScene): |
43 wrap = True | |
44 | |
43 def __init__(self, game_state, soundsystem): | 45 def __init__(self, game_state, soundsystem): |
44 super(TextCutScene, self).__init__(game_state, soundsystem) | 46 super(TextCutScene, self).__init__(game_state, soundsystem) |
45 self._background_img = data.load_image('backgrounds/' + self.background) | 47 self._background_img = data.load_image('backgrounds/' + self.background) |
46 fill = pygame.Surface(self._background_img.get_size(), flags=SRCALPHA) | 48 fill = pygame.Surface(self._background_img.get_size(), flags=SRCALPHA) |
47 fill.fill((255, 255, 255, 128)) | 49 fill.fill((255, 255, 255, 128)) |
53 | 55 |
54 text_widget = Text(unindent_text(self.text), | 56 text_widget = Text(unindent_text(self.text), |
55 pygame.Rect(20, 20, | 57 pygame.Rect(20, 20, |
56 constants.SCREEN[0] - 40, | 58 constants.SCREEN[0] - 40, |
57 constants.SCREEN[1] - 40), | 59 constants.SCREEN[1] - 40), |
58 size=24, shadow='gray', wrap=True) | 60 size=24, shadow='gray', wrap=self.wrap) |
59 self.widgets.append(text_widget) | 61 self.widgets.append(text_widget) |
60 | 62 |
61 def draw(self, surface, engine): | 63 def draw(self, surface, engine): |
62 viewport = surface.get_clip() | 64 viewport = surface.get_clip() |
63 | 65 |
98 fox = self.game_state.world.fox | 100 fox = self.game_state.world.fox |
99 ChangeScene.post((LevelScene, '.'.join([fox.level, fox.doorway]))) | 101 ChangeScene.post((LevelScene, '.'.join([fox.level, fox.doorway]))) |
100 | 102 |
101 | 103 |
102 class UsageCutScene(TextCutScene): | 104 class UsageCutScene(TextCutScene): |
105 wrap = False | |
103 text = u""" | 106 text = u""" |
104 Arrow keys control your movement. | 107 Arrow keys control your movement. |
108 Double-tap ← or → to sprint | |
109 Z and X to perform attacks. | |
105 | 110 |
106 Double-tap ← or → to sprint, ↑ to fly (when you can). | |
107 | 111 |
108 Z and X perform attacks. | 112 With the right tails, you can do the following: |
113 C to shift shape. | |
114 V to make you invisible. | |
115 Double-tap ↑ to fly. | |
116 | |
117 | |
118 Dvorak users: Pass the --dvorak command-line argument | |
109 """ | 119 """ |
110 background = 'background_02_back.png' | 120 background = 'background_02_back.png' |
111 music = None | 121 music = None |
112 | 122 |
113 | 123 |