diff options
author | rcoh <rcoh@mit.edu> | 2011-02-13 16:03:39 -0500 |
---|---|---|
committer | rcoh <rcoh@mit.edu> | 2011-02-13 16:03:39 -0500 |
commit | 6e0e6869a5ee1e4963071a18f24aa4dfdd442689 (patch) | |
tree | 59dfe233e69f331afe3be9137fe5638f359e1f56 /inputs | |
parent | f6dd5ab92949843d2fb163e2d84f19e824a291dc (diff) |
Added a circle behavior to make circles. Added ContinuousCenterInput to do what it says. Modified
SimpleMapper a bit.
Diffstat (limited to 'inputs')
-rw-r--r-- | inputs/ContinuousCenterInput.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/inputs/ContinuousCenterInput.py b/inputs/ContinuousCenterInput.py new file mode 100644 index 0000000..a7635b2 --- /dev/null +++ b/inputs/ContinuousCenterInput.py @@ -0,0 +1,12 @@ +import util.TimeOps as clock +import util.ComponentRegistry as compReg +import util.Strings as Strings +from operationscore.Input import * +class ContinuousCenterInput(Input): + def inputInit(self): + minX,minY,maxX,maxY = compReg.getComponent('Screen').getSize() + self.center = ((minX+maxX) / 2, (minY+maxY) / 2) + print self.center + def sensingLoop(self): + self.respond({Strings.LOCATION: self.center}) + |