from pygame import Surface
import pygame.locals as pgl
from ..loaders.levelloader import levels
-from .base import Scene, ChangeSceneEvent, MoveViewportEvent, WorldEvent, defer_to_update
+from .base import (
+ Scene, ChangeSceneEvent, MoveViewportEvent, WorldEvent, defer_to_update)
from ..constants import TILE_SIZE, WIDTH, HEIGHT
from ..roaches import build_roach
from ..vehicles.base import Vehicle
def exit(self, world):
for generator in self._generators:
- # We don't want these running while we're on other levels, but we don't want to delete them
- # here either (because of the vehicle management view)
+ # We don't want these running while we're on other levels, but we
+ # don't want to delete them here either (because of the vehicle
+ # management view)
generator.pause()
def _init_generators(self):
(keys.RIGHT, (1, 0), -90),
):
if key == k:
- if self._angle == angle and self._last_key_down > self._key_rate:
+ if (self._angle == angle and
+ self._last_key_down > self._key_rate):
nx, ny = x + dp[0], y + dp[1]
if self._can_move(nx, ny):
self._set_pos(nx, ny)
if key in (keys.DOWN, keys.UP, keys.LEFT, keys.RIGHT):
self._held_keys.clear()
self._held_keys.add(key)
- # We do this so pressing the key has an instant effect, and can then be held
+ # We do this so pressing the key has an instant effect, and can
+ # then be held
self._last_key_down = self._key_rate + 0.01
return self._movement_key(key, 0.01)
elif key == keys.C: