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