Permalink
Browse files

Merge branch 'master' of github.com:utcoupe/Coupe2012

  • Loading branch information...
2 parents 3efafd0 + fbddfad commit ec8ae8ae19cac00b1abcb439c8903b7e471243e4 @trecouvr trecouvr committed May 16, 2012
Showing with 6 additions and 0 deletions.
  1. +1 −0 simu/simu/define.py
  2. +5 −0 simu/simu/objects/robot.py
View
@@ -42,6 +42,7 @@
KEY_BULDO = K_x # mode buldozer
KEY_TELEPORTATION = K_t # mode téléportation
KEY_RECUL = K_r # mode marche arrière
+KEY_JACK = K_j # jack
BIG = 0
@@ -105,6 +105,8 @@ def __init__(self, *, engine, canal_asserv, canal_others, canal_visio, canal_ext
self.transform("extras", canal_extras)
self.body._set_velocity_func(self._my_velocity_func())
+
+ self.state_jack = 0 # jack in
def init(self, engine):
self.engine = engine
@@ -322,6 +324,9 @@ def onEvent(self, event):
return True
elif KEY_RECUL == event.key:
self.mod_recul = not self.mod_recul
+ elif KEY_JACK == event.key:
+ self.state_jack = 0 if self.state_jack else 1
+ self.send_canal_others(ID_MSG_JACK, self.state_jack)
elif KEYUP == event.type:
if KEY_CHANGE_TEAM == event.key:
print("équipe bleu")

0 comments on commit ec8ae8a

Please sign in to comment.