aboutsummaryrefslogtreecommitdiff
path: root/behaviors/RunningBehavior.py
diff options
context:
space:
mode:
Diffstat (limited to 'behaviors/RunningBehavior.py')
-rw-r--r--behaviors/RunningBehavior.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/behaviors/RunningBehavior.py b/behaviors/RunningBehavior.py
index 92db69b..5eb33f7 100644
--- a/behaviors/RunningBehavior.py
+++ b/behaviors/RunningBehavior.py
@@ -15,6 +15,7 @@ class RunningBehavior(Behavior):
outDict['StepSize'] = self['StepSize']
outDict['Location']= Geo.addLocations(outDict['Location'],
(outDict['StepSize']*outDict['Dir'],0))
+
if not Geo.pointWithinBoundingBox(outDict['Location'], \
compReg.getComponent('Screen').getSize()):
outDict['Dir'] *= -1