aboutsummaryrefslogtreecommitdiff
path: root/behaviors/MoveBehavior.py
diff options
context:
space:
mode:
authorGravatar dan <dmtaub@gmail.com>2011-01-28 16:31:58 -0500
committerGravatar dan <dmtaub@gmail.com>2011-01-28 16:31:58 -0500
commitb11a72afece56dc138aac5400057668e8388f43d (patch)
treeb779455122ee1987d3fcd9b51fcffa8d03057b86 /behaviors/MoveBehavior.py
parent6a0bfdfb00944ae0bcc6215a194c3290b4a085f2 (diff)
parentb67a37ad06fa4c97dcdb32cecc71c7f492b12840 (diff)
Merge branch 'fridaydemo' of github.com:rcoh/SmootLight into osc
Conflicts: behaviors/ControllerOSC.py
Diffstat (limited to 'behaviors/MoveBehavior.py')
-rw-r--r--behaviors/MoveBehavior.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/behaviors/MoveBehavior.py b/behaviors/MoveBehavior.py
index e504ca9..6e7fc6a 100644
--- a/behaviors/MoveBehavior.py
+++ b/behaviors/MoveBehavior.py
@@ -19,12 +19,13 @@ class MoveBehavior(Behavior):
currDict = dict(currRecLoc)
for sensorInput in sensorInputs:
if 'type' in sensorInput and sensorInput['type'] == 1:
+ currDict['Shake'] = 0
currDict['Location'] = (currDict['Location'][0] - sensorInput['x'] * self['XStep'], \
currDict['Location'][1] + sensorInput['y'] * self['YStep'])
currDict['Color'] = [sensorInput['r'], sensorInput['g'], sensorInput['b']]
- #elif sensorInput['type'] == 2:
- # currDict['Shake'] = 1
- # currDict['Force'] = sensorInput['force']
+ elif sensorInput['type'] == 2:
+ currDict['Shake'] = 1
+ #currDict['Force'] = sensorInput['force']
ret.append(currDict)
#print ret
return (ret, ret)