Mercurial > fife-parpg
comparison demos/shooter/scripts/scene.py @ 500:5e6ff32a46fb
Added listener position to the soundmanager.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 14 May 2010 20:28:05 +0000 |
parents | ae9f5383f5b1 |
children | cccff9b04f57 |
comparison
equal
deleted
inserted
replaced
499:3dff106b945b | 500:5e6ff32a46fb |
---|---|
374 exactloc = self._camera.getLocation().getExactLayerCoordinates() | 374 exactloc = self._camera.getLocation().getExactLayerCoordinates() |
375 #slowly move to the right | 375 #slowly move to the right |
376 exactloc.x += timedelta * self._cameraspeed | 376 exactloc.x += timedelta * self._cameraspeed |
377 loc.setExactLayerCoordinates(exactloc) | 377 loc.setExactLayerCoordinates(exactloc) |
378 self._camera.setLocation(loc) | 378 self._camera.setLocation(loc) |
379 | |
380 #update the listener position | |
381 self._soundmanager.listenerposition = (exactloc.x, exactloc.y) | |
379 | 382 |
380 topleft = self._camera.toMapCoordinates(fife.ScreenPoint(0,0)) | 383 topleft = self._camera.toMapCoordinates(fife.ScreenPoint(0,0)) |
381 bottomright = self._camera.toMapCoordinates(fife.ScreenPoint(1024,768)) | 384 bottomright = self._camera.toMapCoordinates(fife.ScreenPoint(1024,768)) |
382 | 385 |
383 #which scene nodes to use to update objects | 386 #which scene nodes to use to update objects |