comparison gamelib/engine.py @ 434:f2a55e5e24db

Disable non-selectable toolbar widgets at night
author Neil Muller <drnlmuller@gmail.com>
date Sat, 21 Nov 2009 17:33:49 +0000
parents ab4fc3fe0f96
children 66bc99477155
comparison
equal deleted inserted replaced
433:8643893635e7 434:f2a55e5e24db
254 pygame.time.set_timer(MOVE_FOX_ID, 0) 254 pygame.time.set_timer(MOVE_FOX_ID, 0)
255 # Clear any queued timer events, so we don't full the queue 255 # Clear any queued timer events, so we don't full the queue
256 pygame.event.clear(ANIM_ID) 256 pygame.event.clear(ANIM_ID)
257 pygame.event.clear(MOVE_FOX_ID) 257 pygame.event.clear(MOVE_FOX_ID)
258 # Ensure any outstanding animitions get cleaned up 258 # Ensure any outstanding animitions get cleaned up
259 self.game.gameboard.run_animations()
260 self.cycle_count += 1 259 self.cycle_count += 1
261 if self.cycle_count > constants.NIGHT_LENGTH: 260 if self.cycle_count > constants.NIGHT_LENGTH:
262 return pygame.event.post(START_DAY) 261 return pygame.event.post(START_DAY)
263 if self.game.gameboard.do_night_step(): 262 if self.game.gameboard.do_night_step():
264 # All foxes are gone/safe, so dawn happens 263 # All foxes are gone/safe, so dawn happens