summaryrefslogtreecommitdiffhomepage
path: root/host/simu/robots/apbirthday/view
diff options
context:
space:
mode:
authorNicolas Schodet2013-05-10 18:57:04 +0200
committerNicolas Schodet2013-05-10 18:57:04 +0200
commitbd2858ce154fb677a146abf98e843c9610429456 (patch)
tree4ee57b09b5154a3dbefa2b38acb3fc27c949c956 /host/simu/robots/apbirthday/view
parente4442bb23654930f4bc50ad48082815ee59ba46c (diff)
host/simu/robots/apbirthday: update cannon model & view
Diffstat (limited to 'host/simu/robots/apbirthday/view')
-rw-r--r--host/simu/robots/apbirthday/view/robot.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/host/simu/robots/apbirthday/view/robot.py b/host/simu/robots/apbirthday/view/robot.py
index 96139b9b..16b4878a 100644
--- a/host/simu/robots/apbirthday/view/robot.py
+++ b/host/simu/robots/apbirthday/view/robot.py
@@ -30,6 +30,7 @@ from simu.robots.apbirthday.model import front, back, side
COLOR_ROBOT = '#000000'
COLOR_AXES = '#202040'
COLOR_CANNON = '#808080'
+COLOR_CANNON_FIRE = '#800000'
COLOR_BALLON = '#ff0000'
class Robot (simu.inter.drawable.Drawable):
@@ -79,7 +80,8 @@ class Robot (simu.inter.drawable.Drawable):
self.draw_polygon ((front, side), (front, -side), (-back, -side),
(-back, 81), (-50, side), fill = COLOR_ROBOT)
self.draw_circle ((50, self.cannon_model.cannon_hit[1]), 20,
- fill = COLOR_CANNON)
+ fill = COLOR_CANNON_FIRE if self.cannon_model.firing
+ else COLOR_CANNON)
# Draw Robot axis.
self.draw_line ((-50, 0), (50, 0), fill = COLOR_AXES,
arrow = 'last')