Package SmootLight :: Package inputs :: Module ContinuousCenterInput
[hide private]
[frames] | no frames]

Source Code for Module SmootLight.inputs.ContinuousCenterInput

 1  import util.TimeOps as clock 
 2  import util.ComponentRegistry as compReg 
 3  import util.Strings as Strings 
 4  from operationscore.Input import * 
5 -class ContinuousCenterInput(Input):
6 - def inputInit(self):
7 compReg.getLock().acquire() 8 minX,minY,maxX,maxY = compReg.getComponent('Screen').getSize() 9 compReg.getLock().release() 10 self.center = ((minX+maxX) / 2, (minY+maxY) / 2)
11 - def sensingLoop(self):
12 self.respond({Strings.LOCATION: self.center})
13