From da934a838305bab72bd12dcd2b83e689f7c1cc3f Mon Sep 17 00:00:00 2001 From: Jim Salem Date: Fri, 28 Jan 2011 18:28:25 -0500 Subject: 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) --- behaviors/EchoBehavior.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'behaviors/EchoBehavior.py') 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, []) -- cgit v1.2.3