From 6e0e6869a5ee1e4963071a18f24aa4dfdd442689 Mon Sep 17 00:00:00 2001 From: rcoh Date: Sun, 13 Feb 2011 16:03:39 -0500 Subject: Added a circle behavior to make circles. Added ContinuousCenterInput to do what it says. Modified SimpleMapper a bit. --- inputs/ContinuousCenterInput.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 inputs/ContinuousCenterInput.py (limited to 'inputs') 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}) + -- cgit v1.2.3