diff options
author | Russell Cohen <rcoh@mit.edu> | 2010-11-25 21:44:00 -0500 |
---|---|---|
committer | Russell Cohen <rcoh@mit.edu> | 2010-11-25 21:44:00 -0500 |
commit | 5783d6336f014c05e0e46d7bc35533e70b280582 (patch) | |
tree | b4e0b0b2787b8fe464baadbd375ad6dc6c1dbf76 /inputs | |
parent | b042647b68abdc82490ca6e059993b8eba28904c (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.py | 2 | ||||
-rw-r--r-- | inputs/__init__.py | 0 |
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 |