diff options
author | Jim Salem <jsalem@gmail.com> | 2011-01-28 18:28:25 -0500 |
---|---|---|
committer | suny@mit.edu <necsys@necsys-susanne-ubuntu-2.(none)> | 2011-01-28 18:31:08 -0500 |
commit | da934a838305bab72bd12dcd2b83e689f7c1cc3f (patch) | |
tree | 1295c5ba609d7e04ac1fa1173ee2187f7cfb8d55 /behaviors/EchoBehavior.py | |
parent | a7d6577e55ebd665ad9e4f45183836f11b3c6fd4 (diff) |
New Flasher behavior which fades colors in and out.
Several new color functions.
Created a "firefly" demo (moving colored bubbles that fade in and out)
Diffstat (limited to 'behaviors/EchoBehavior.py')
-rw-r--r-- | behaviors/EchoBehavior.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/behaviors/EchoBehavior.py b/behaviors/EchoBehavior.py index 6ef4fcb..c4af7c0 100644 --- a/behaviors/EchoBehavior.py +++ b/behaviors/EchoBehavior.py @@ -9,6 +9,9 @@ class EchoBehavior(Behavior): for sensory in sensorInputs: outDict = {} outDict[Strings.LOCATION] = sensory[Strings.LOCATION] - outDict['Color'] = (255,0,0) + if self['Color'] != None: + outDict['Color'] = self['Color'] + else: + outDict['Color'] = (255,0,0) ret.append(outDict) return (ret, []) |