projects
/
koperkapel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
uninterrupted murder
[koperkapel.git]
/
koperkapel
/
scenes
/
level.py
diff --git
a/koperkapel/scenes/level.py
b/koperkapel/scenes/level.py
index 0aaa33d487dea765feeaa6776552fc26cefdfb3e..66eccf0ed167e77b655b106eb329ba20cf91812d 100644
(file)
--- a/
koperkapel/scenes/level.py
+++ b/
koperkapel/scenes/level.py
@@
-363,8
+363,11
@@
class GameLevelScene(BaseLevelScene):
def on_key_down(self, key, mod, unicode):
x, y = self._player_pos
if key in (keys.DOWN, keys.UP, keys.LEFT, keys.RIGHT):
def on_key_down(self, key, mod, unicode):
x, y = self._player_pos
if key in (keys.DOWN, keys.UP, keys.LEFT, keys.RIGHT):
+ firing = (keys.X in self._held_keys)
self._held_keys.clear()
self._held_keys.add(key)
self._held_keys.clear()
self._held_keys.add(key)
+ if firing:
+ self._held_keys.add(keys.X)
# 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
# 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