Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/game/HallState.py
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2013-09-24 15:40:33 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2013-09-24 15:40:33 (GMT)
commite421f553087396161a4b20cae5a92593a68e118f (patch)
treea9a423bf13c0dad7ec513d99996534b1e814bcef /src/game/HallState.py
parentdc6f9f9a4ecadbf85650b7341234212f33b3ac33 (diff)
simplify use of addChild
Diffstat (limited to 'src/game/HallState.py')
-rw-r--r--src/game/HallState.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/game/HallState.py b/src/game/HallState.py
index bb5294d..04e9ee3 100644
--- a/src/game/HallState.py
+++ b/src/game/HallState.py
@@ -67,7 +67,6 @@ class CHallState(CGameState):
self.mDoor.setXY(400, 50)
self.mFrameImageDoor = Image.loadImage('assets/images/hall/A1-puerta-resaltada.png')
self.mDoor.setImage(self.mFrameImageDoor)
- self.mDoorIs = False
self.mStar1 = Image.loadImage('assets/images/hall/star1.png')
self.mStar2 = Image.loadImage('assets/images/hall/star2.png')
@@ -137,9 +136,7 @@ class CHallState(CGameState):
return
if (CMath.pointInsidePolygon(CMouse().getX(), CMouse().getY(), self.AREA1_POLYGON)):
- if not(self.mDoorIs):
- CGame().addChild(self.mDoor)
- self.mDoorIs = True
+ CGame().addChild(self.mDoor)
if (CMouse().release()):
x = CMouse().getX() - self.mPlayer.getX()
@@ -156,9 +153,7 @@ class CHallState(CGameState):
self.mGo = self.mCurrentSelectedArea
else:
- if self.mDoorIs:
- CGame().removeChild(self.mDoor)
- self.mDoorIs = False
+ CGame().removeChild(self.mDoor)
if self.mGo is not None:
x = self.mPlayer.getX()