Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2012-06-12 07:14:12 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2012-06-12 07:14:12 (GMT)
commitdec0549eda27d7dd88b8aa74aa63c56bb5f05518 (patch)
tree9f1c616c278b498edb1f8df6dcb34eb169ab95c7 /src
parent56e879fd7ebdeabeb6b7e0b7a4a68ae893b7d1ff (diff)
add points box in a1g6
Diffstat (limited to 'src')
-rw-r--r--src/game/Area1Game6.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game/Area1Game6.py b/src/game/Area1Game6.py
index 2e2cac7..dd10ca8 100644
--- a/src/game/Area1Game6.py
+++ b/src/game/Area1Game6.py
@@ -5,6 +5,7 @@ import sys
import pygame
from api.Sprite import CSprite
from api.Button import CButton
+from api.Points import CPoints
from api.MultiLabel import CMultiLabel
from api.Mouse import *
import api.Math as Math
@@ -82,6 +83,8 @@ class Piece(CSprite):
self.setState(STATE_OK)
+ self.mParent.mGood = self.mParent.mGood + 1
+ self.mParent.mPoints.set_goods(self.mParent.mGood)
elif (self.mState == STATE_RETURN):
@@ -89,6 +92,8 @@ class Piece(CSprite):
if (dist < self.RADIUS_COLLISION):
#play(Sonido mal)
self.setState(STATE_STALE)
+ self.mParent.mBad = self.mParent.mBad+ 1
+ self.mParent.mPoints.set_bads(self.mParent.mBad)
elif (self.mState == STATE_OK):
pass
@@ -155,6 +160,9 @@ class CArea1Game6(CGameState):
self.mHelpActive = None
self.mHelpPrevious = None
+ self.mBad = 0
+ self.mGood = 0
+
#self.mInstructions = CMultiLabel()
#CGame().addChild(self.mInstructions)
@@ -289,6 +297,10 @@ class CArea1Game6(CGameState):
#CGame().addChild(self.mHelp01)
+ self.mPoints = CPoints()
+ self.mPoints.setXY(250, 10)
+ CGame().addChild(self.mPoints)
+
def update(self):
#print "menu update"
@@ -325,6 +337,8 @@ class CArea1Game6(CGameState):
#self.mInstructions.destroy()
self.mInstructions = None
CGame().removeChild(self.mButtonBack)
+ CGame().removeChild(self.mPoints)
+
# remove pieces from the game
for piece in self.mListPieces:
@@ -340,6 +354,8 @@ class CArea1Game6(CGameState):
self.mWord01 = None
self.mHelp01 = None
+
+ self.mPoints = None
print "CArea1Game6 destroy"