aboutsummaryrefslogtreecommitdiff
path: root/behaviors/DecayBehavior.py
blob: f19ffc8cfee4d27e591b141c65084d036815deaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from operationscore.Behavior import *
from pixelevents.DecayEvent import *
import util.Strings as Strings
import pdb
class DecayBehavior(Behavior):
    """DecayBehavior is obsolete.  Use AddPixelEvent instead"""
    def processResponse(self, sensorInputs, recursiveInputs):
        ret = []
        for sensory in sensorInputs:
            outDict = {}
            outDict[Strings.LOCATION] = sensory[Strings.LOCATION]
            outDict['PixelEvent'] = \
            DecayEvent.generate(self['DecayType'],self['Coefficient'], sensory['Color'])
            ret.append(outDict)
        return (ret, recursiveInputs)