diff options
Diffstat (limited to 'src/states/Area1Game3.py')
-rwxr-xr-x | src/states/Area1Game3.py | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/states/Area1Game3.py b/src/states/Area1Game3.py index 5bbc8e7..4e63984 100755 --- a/src/states/Area1Game3.py +++ b/src/states/Area1Game3.py @@ -1,3 +1,55 @@ import pygame +import api.Game +from api.Game import CGame + +import states.GameState +from states.GameState import CGameState + +import api.Button +from api.Button import CButton + +import MenuState +from MenuState import * + +import sys +sys.path.insert(0, 'assets/data') + +import area1game3_data + + +class CArea1Game3(CGameState): + mBackground = None + mInstructions = None + + mButtonBack = None + + def init(self): + CGameState.init(self) + + self.mButtonBack = CButton() + #TODO: Create a function to create image. + self.mButtonBack.set_bgColor((0x99, 0x99, 0x66)) + self.mButtonBack.font = pygame.font.Font('assets/fonts/fipps.ttf', 20) + self.mButtonBack.setCenter((110, 650)) + self.mButtonBack.set_size((200, 40)) + self.mButtonBack.set_text('Volver') + CGame().addChild(self.mButtonBack) + + def update(self): + CGameState.update(self) + + if self.mButtonBack.clicked(): + print "clicked back of a1g3" + #cs = CHelpState() + ms = MenuState.CMenuState() + CGame().setState(ms) + + + def destroy(self): + CGameState.destroy(self) + #self.mInstructions.destroy() + self.mInstructions = None + CGame().removeChild(self.mButtonBack) + self.mButtonBack = None
\ No newline at end of file |