diff demos/shooter/scripts/scene.py @ 451:f463ab431cc0

Movement shouldn't be dependent on framerate anymore. Some minor tweaks.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 01 Apr 2010 21:14:23 +0000
parents ba6817013343
children f07d779362da
line wrap: on
line diff
--- a/demos/shooter/scripts/scene.py	Thu Apr 01 19:26:56 2010 +0000
+++ b/demos/shooter/scripts/scene.py	Thu Apr 01 21:14:23 2010 +0000
@@ -50,6 +50,8 @@
 		self._nodes = list()
 		
 		self._player = Player(self._model, 'player', self._layer)
+		self._player.width = 0.075
+		self._player.height = 0.075
 		self._player.start()
 		
 		self._projectiles = list()
@@ -68,23 +70,22 @@
 			self._nodes.append(SceneNode())
 		
 		for instance in enemies:
-			loc = instance.getLocation().getExactLayerCoordinates()
-			
 			objectName = instance.getObject().getId()
 			print objectName
 			
 			enemy = Ship(self._model, 'enemy', self._layer, False)
 			enemy.instance = instance
-			enemy.width = 0.5
-			enemy.height = 0.5
-			enemy.velocity.x = -0.013
+			enemy.width = 0.075
+			enemy.height = 0.075
+			enemy.velocity.x = -0.13
 			enemy.start()
-			
+
+			loc = instance.getLocation().getExactLayerCoordinates()
 			nodeindex = int(loc.x * xscale)
 			self._nodes[nodeindex].spaceobjects.append(enemy)
 
-	def getObjectsInNode(self, node):
-		return self._nodes[node].instances
+	def getObjectsInNode(self, nodeindex):
+		return self._nodes[nodeindex].instances
 
 	def getObjectsInRange(self, rangeL, rangeR):
 		objects = list()