Mercurial > fife-parpg
diff demos/shooter/scripts/world.py @ 450:ba6817013343
Added score keeping ability.
Some misc cleanup.
Fixed the bounding box.
Enemies are now removed from the scene when they are destroyed.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Thu, 01 Apr 2010 19:26:56 +0000 |
parents | 5e2ec84902a7 |
children | f463ab431cc0 |
line wrap: on
line diff
--- a/demos/shooter/scripts/world.py Thu Apr 01 18:44:01 2010 +0000 +++ b/demos/shooter/scripts/world.py Thu Apr 01 19:26:56 2010 +0000 @@ -83,6 +83,7 @@ self.fpstext = self.mainwindow.findChild(name="fps") self.velocitytext = self.mainwindow.findChild(name="velocity") self.positiontext = self.mainwindow.findChild(name="position") + self.scoretext = self.mainwindow.findChild(name="score") self.mainwindow.position = (0,0) self.mainwindow.show() @@ -177,5 +178,8 @@ vel = "%1.2f" % player.velocity.x + ", %1.2f" % player.velocity.y self.velocitytext.text = unicode(vel) + score = unicode(str(player.score)) + self.scoretext.text = score + self.pump_ctr += 1