From 5783d6336f014c05e0e46d7bc35533e70b280582 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 25 Nov 2010 21:44:00 -0500 Subject: 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. --- inputs/PygameInput.py | 2 ++ inputs/__init__.py | 0 2 files changed, 2 insertions(+) create mode 100644 inputs/__init__.py (limited to 'inputs') 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 -- cgit v1.2.3