blob: 88534f07926d5180a0594c9e11b612d3fe9b5461 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
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):
compReg.getLock().acquire()
minX,minY,maxX,maxY = compReg.getComponent('Screen').getSize()
compReg.getLock().release()
self.center = ((minX+maxX) / 2, (minY+maxY) / 2)
def sensingLoop(self):
self.respond({Strings.LOCATION: self.center})
|