Mercurial > rinkhals
comparison gamelib/engine.py @ 223:527a5d4e3fa3
Disable tools at night.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Fri, 04 Sep 2009 22:39:19 +0000 |
parents | 322e6d3a46e4 |
children | 96d440bebdaa |
comparison
equal
deleted
inserted
replaced
222:322e6d3a46e4 | 223:527a5d4e3fa3 |
---|---|
103 | 103 |
104 class DayState(State): | 104 class DayState(State): |
105 def init(self): | 105 def init(self): |
106 """Add some chickens to the farm""" | 106 """Add some chickens to the farm""" |
107 sound.stop_background_music() | 107 sound.stop_background_music() |
108 self.game.gameboard.tv.sun(True) | 108 self.game.gameboard.start_day() |
109 | 109 |
110 sound.play_sound("daybreak.ogg") | 110 sound.play_sound("daybreak.ogg") |
111 # disable timer | 111 # disable timer |
112 pygame.time.set_timer(MOVE_FOX_ID, 0) | 112 pygame.time.set_timer(MOVE_FOX_ID, 0) |
113 pygame.time.set_timer(ANIM_ID, 50) | 113 pygame.time.set_timer(ANIM_ID, 50) |
145 | 145 |
146 class NightState(State): | 146 class NightState(State): |
147 def init(self): | 147 def init(self): |
148 """Add some foxes to the farm""" | 148 """Add some foxes to the farm""" |
149 sound.stop_background_music() | 149 sound.stop_background_music() |
150 self.game.gameboard.tv.sun(False) | 150 self.game.gameboard.start_night() |
151 self.game.gameboard.reset_states() | |
152 | 151 |
153 sound.play_sound("nightfall.ogg") | 152 sound.play_sound("nightfall.ogg") |
154 # Add a timer to the event queue | 153 # Add a timer to the event queue |
155 self.cycle_count = 0 | 154 self.cycle_count = 0 |
156 self.cycle_time = 200 | 155 self.cycle_time = 200 |