diff options
author | Russell Cohen <rcoh@mit.edu> | 2010-11-29 00:00:26 -0500 |
---|---|---|
committer | Russell Cohen <rcoh@mit.edu> | 2010-11-29 00:00:26 -0500 |
commit | cf1f2224b3625b01a6aa7db221403849b308b3bc (patch) | |
tree | 9ad55077f45efc7a8434688332ee281a28a1cae7 /operationscore/PixelEvent.py | |
parent | 9c9babfa7032b443138c4b457aabaf79fad385b3 (diff) |
Making recursive behaviors work. Some bugs existed before. Adding running
behavior which makes a signal bounce back and forth.
Diffstat (limited to 'operationscore/PixelEvent.py')
-rw-r--r-- | operationscore/PixelEvent.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/operationscore/PixelEvent.py b/operationscore/PixelEvent.py index 8567d93..66b6fdf 100644 --- a/operationscore/PixelEvent.py +++ b/operationscore/PixelEvent.py @@ -8,8 +8,11 @@ class PixelEvent(SmootCoreObject): self.initEvent() def initEvent(self): pass - def scale(c): - self['Color'] *= c + #Returns a new PixelEvent, but with a response scaled by c. + def scale(self,c): + newDict = dict(self.argDict) + newDict['Color'] = Util.multiplyColor(newDict['Color'], c) + return self.__class__(newDict) def state(self,timeDelay): pass |