self._mode = 'walk'
elif self._level.is_keypad(x, y):
self._level.press_keypad(x, y, self._roaches)
- elif self._level.is_on_friend(x, y):
- friend = self._level.remove_friend(x, y)
+ elif self._level.friend_at(x, y):
+ friend = self._level.friend_at(x, y)
+ self._level.remove_friend(friend)
self._friends.remove(friend)
self._add_roach()
+ elif self._level.item_at(x, y):
+ item = self._level.item_at(x, y)
+ self._level.remove_item(item)
+ self._items.remove(item)
elif self._level.is_exit(x, y):
next_level = self._level.get_exit_level()
- return [WorldEvent('set', {'level.name': next_level}), ChangeSceneEvent(GameLevelScene())]
+ return [
+ WorldEvent('set', {'level.name': next_level}),
+ ChangeSceneEvent(GameLevelScene())]
- def _fire_key(self):
- print('Boom')
+ def _fire_key(self, dt):
+ if self._last_key_down > self._key_rate:
+ self._last_key_down = 0
+ print('Boom')
def _vehicle_management_key(self):
from .roach_management import RoachesScene