view user.py @ 48:0598557ca61b
Nicer tank graphics. Displays body direction too.
author |
Daniil Alexeyevsky <me.dendik@gmail.com> |
date |
Mon, 20 Dec 2010 20:58:14 +0300 |
parents |
0b4a191acd89 |
children |
d740eff76e7e |
line source
3 def __init__(self, keyset):
8 self.base_right = False
9 self.turret_left = False
10 self.turret_right = False
11 self.accelerate = False
12 self.decelerate = False
15 def on_key(self, key, value):
16 if key not in self.keyset:
18 action = self.keyset[key]
19 if hasattr(self, action) and action not in ['tank', 'keyset']:
20 setattr(self, action, value)