diff options
author | Alan Aguiar <alanjas@hotmail.com> | 2013-09-14 07:05:41 (GMT) |
---|---|---|
committer | Alan Aguiar <alanjas@hotmail.com> | 2013-09-14 07:05:41 (GMT) |
commit | 73110ef433590face714dc37cc07d37f6a1c7675 (patch) | |
tree | b249cb6daa4dd720501287c584a1de82a0989beb /src/game | |
parent | 3be5697b9957afddfc3bb992a35e35b5f1d6fe37 (diff) |
improve mouse over in a1g6
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/Area1Game6.py | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/game/Area1Game6.py b/src/game/Area1Game6.py index 76d65b5..d36075d 100644 --- a/src/game/Area1Game6.py +++ b/src/game/Area1Game6.py @@ -26,17 +26,17 @@ STATE_OK = 4 DX = 50 DY = 50 -WORD1 = [(DX + 400, DY + 0), (DX + 800, DY + 0), (DX + 400, DY + 50), (DX + 800, DY + 50)] -WORD2a = [(DX + 150, DY + 100), (DX + 350, DY + 100), (DX + 150, DY + 150), (DX + 350, DY + 150)] -WORD2b = [(DX + 400, DY + 100), (DX + 600, DY + 100), (DX + 400, DY + 150), (DX + 600, DY + 150)] -WORD3a = [(DX + 0, DY + 200), (DX + 350, DY + 200), (DX + 0, DY + 250), (DX + 350, DY + 250)] -WORD3b = [(DX + 400, DY + 200), (DX + 800, DY + 200), (DX + 400, DY + 250), (DX + 800, DY + 250)] -WORD4a = [(DX + 250, DY + 300), (DX + 350, DY + 300), (DX + 250, DY + 350), (DX + 350, DY + 350)] -WORD4b = [(DX + 400, DY + 300), (DX + 500, DY + 300), (DX + 400, DY + 350), (DX + 500, DY + 350)] -WORD5a = [(DX + 200, DY + 350), (DX + 350, DY + 350), (DX + 200, DY + 400), (DX + 350, DY + 400)] -WORD5b = [(DX + 400, DY + 350), (DX + 600, DY + 350), (DX + 400, DY + 400), (DX + 600, DY + 400)] -WORD6 = [(DX + 150, DY + 500), (DX + 350, DY + 500), (DX + 150, DY + 550), (DX + 350, DY + 550)] -WORD7 = [(DX + 350, DY + 0), (DX + 400, DY + 0), (DX + 350, DY + 600), (DX + 400, DY + 600)] +WORD1 = [(DX + 400, DY + 0), (DX + 800, DY + 50)] +WORD2a = [(DX + 150, DY + 100), (DX + 350, DY + 150)] +WORD2b = [(DX + 400, DY + 100), (DX + 600, DY + 150)] +WORD3a = [(DX + 0, DY + 200), (DX + 350, DY + 250)] +WORD3b = [(DX + 400, DY + 200), (DX + 800, DY + 250)] +WORD4a = [(DX + 250, DY + 300), (DX + 350, DY + 350)] +WORD4b = [(DX + 400, DY + 300), (DX + 500, DY + 350)] +WORD5a = [(DX + 200, DY + 350), (DX + 350, DY + 400)] +WORD5b = [(DX + 400, DY + 350), (DX + 600, DY + 400)] +WORD6 = [(DX + 150, DY + 500), (DX + 350, DY + 550)] +WORD7 = [(DX + 350, DY + 0), (DX + 400, DY + 600)] #Piece class hereda de CSprite @@ -304,19 +304,19 @@ class CArea1Game6(CGameState): y = CMouse().getY() #hay algo mas eficiente? - if CMath.pointInsidePolygon(x,y, WORD1): + if CMath.pointInsideRectangle(x,y, WORD1): self.mHelpActive = 0 - elif CMath.pointInsidePolygon(x,y, WORD2a) or CMath.pointInsidePolygon(x,y, WORD2b): + elif CMath.pointInsideRectangle(x,y, WORD2a) or CMath.pointInsideRectangle(x,y, WORD2b): self.mHelpActive = 1 - elif CMath.pointInsidePolygon(x,y, WORD3a) or CMath.pointInsidePolygon(x,y, WORD3b): + elif CMath.pointInsideRectangle(x,y, WORD3a) or CMath.pointInsideRectangle(x,y, WORD3b): self.mHelpActive = 2 - elif CMath.pointInsidePolygon(x,y, WORD4a) or CMath.pointInsidePolygon(x,y, WORD4b): + elif CMath.pointInsideRectangle(x,y, WORD4a) or CMath.pointInsideRectangle(x,y, WORD4b): self.mHelpActive = 3 - elif CMath.pointInsidePolygon(x,y, WORD5a) or CMath.pointInsidePolygon(x,y, WORD5b): + elif CMath.pointInsideRectangle(x,y, WORD5a) or CMath.pointInsideRectangle(x,y, WORD5b): self.mHelpActive = 4 - elif CMath.pointInsidePolygon(x,y, WORD6): + elif CMath.pointInsideRectangle(x,y, WORD6): self.mHelpActive = 5 - elif CMath.pointInsidePolygon(x,y, WORD7): + elif CMath.pointInsideRectangle(x,y, WORD7): self.mHelpActive = 6 else: self.mHelpActive = None |