Changeset 97:c177cdc41477


Ignore:
Timestamp:
Sep 2, 2013, 9:41:39 AM (7 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Message:

Add WASD controls, switch to "c" for form change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/screens/area.py

    r93 r97  
    6161            if ev.key == pygame.locals.K_ESCAPE:
    6262                ScreenChange.post('menu')
    63             if ev.key == pygame.locals.K_w:
     63            if ev.key == pygame.locals.K_c:
    6464                self.protagonist.toggle_form()
    6565        self.keys.handle_event(ev)
     
    9898        dx, dy = 0, 0
    9999        for key, tx, ty in [
    100             (pygame.locals.K_UP, 0, 1), (pygame.locals.K_DOWN, 0, -1),
    101             (pygame.locals.K_LEFT, -1, 0), (pygame.locals.K_RIGHT, 1, 0)
     100                # Arrows
     101                (pygame.locals.K_UP, 0, 1), (pygame.locals.K_DOWN, 0, -1),
     102                (pygame.locals.K_LEFT, -1, 0), (pygame.locals.K_RIGHT, 1, 0),
     103                # WASD
     104                (pygame.locals.K_w, 0, 1), (pygame.locals.K_s, 0, -1),
     105                (pygame.locals.K_a, -1, 0), (pygame.locals.K_d, 1, 0),
    102106        ]:
    103107            if key in self.keys.keys_down:
Note: See TracChangeset for help on using the changeset viewer.