aboutsummaryrefslogtreecommitdiff
path: root/inputs
diff options
context:
space:
mode:
authorGravatar Russell Cohen <rcoh@mit.edu>2010-11-25 21:44:00 -0500
committerGravatar Russell Cohen <rcoh@mit.edu>2010-11-25 21:44:00 -0500
commit5783d6336f014c05e0e46d7bc35533e70b280582 (patch)
treeb4e0b0b2787b8fe464baadbd375ad6dc6c1dbf76 /inputs
parentb042647b68abdc82490ca6e059993b8eba28904c (diff)
Added BehaviorChain to support chains of behaviors. Added FollowMouse
parameter to PygameInput to support following of mice. Added component registry to Util which allows any component to access any other component. Some changes to the structure of LightInstallation.
Diffstat (limited to 'inputs')
-rw-r--r--inputs/PygameInput.py2
-rw-r--r--inputs/__init__.py0
2 files changed, 2 insertions, 0 deletions
diff --git a/inputs/PygameInput.py b/inputs/PygameInput.py
index 6c84664..e07592b 100644
--- a/inputs/PygameInput.py
+++ b/inputs/PygameInput.py
@@ -7,6 +7,8 @@ from pygame.locals import *
class PygameInput(Input):
def sensingLoop(self):
#try:
+ if self['FollowMouse']:
+ self.respond({Util.location: pygame.mouse.get_pos()})
for event in pygame.event.get():
if event.type is KEYDOWN:
self.respond({Util.location: (5,5),'Key': event.key})
diff --git a/inputs/__init__.py b/inputs/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/inputs/__init__.py