blob: 040e6895e6f849b7e85a5f9259088047d9b33246 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# -*- coding: utf-8 -*-
import pygame
import api.GameState
from api.GameState import CGameState
import api.MultiLabel
from api.MultiLabel import CMultiLabel
import api.Game
from api.Game import CGame
import api.Button
from api.Button import CButton
import game.CreditsState
from CreditsState import *
from api.Sprite import CSprite
#import game.SelectAreaState
#from SelectAreaState import *
import api.Image as Image
from gettext import gettext as _
class CPresentationState(CGameState):
mBackground = None
mCount = 0
def init(self):
CGameState.__init__(self)
self.mBackground = Image.loadImage('assets/images/selectArea/background.png', False)
CGame().setBackground(self.mBackground)
self.mElisa = CSprite()
#ancho = 216 -> 1200 - 216 - juan.X = 834
self.mElisa.setXY(834, 300)
elisa = Image.loadImage('assets/images/selectArea/T-elisa.png')
self.mElisa.setImage(elisa)
CGame().addChild(self.mElisa)
self.mJuan = CSprite()
self.mJuan.setXY(150, 300)
juan = Image.loadImage('assets/images/selectArea/T-juan.png')
self.mJuan.setImage(juan)
CGame().addChild(self.mJuan)
self.mTitle = CSprite()
#ancho = 447 -> (1200 - 447 ) / 2 = 376
self.mTitle.setXY(376, 193)
self.mImageTitle = Image.loadImage('assets/images/selectArea/T-rotulo.png')
self.mTitle.setImage(self.mImageTitle)
CGame().addChild(self.mTitle)
def update(self):
#print "menu update"
CGameState.update(self)
self.mCount = self.mCount + 1
if self.mCount > 150:
print "clicked credits"
#cs = CHelpState()
credits = CCreditsState()
CGame().setState(credits)
return
def destroy(self):
CGameState.destroy(self)
CGame().removeChild(self.mElisa)
self.mElisa.destroy()
self.mElisa = None
CGame().removeChild(self.mJuan)
self.mJuan.destroy()
self.mJuan = None
CGame().removeChild(self.mTitle)
self.mTitle.destroy()
self.mTitle = None
self.mBackground = None
print "CMenuState destroy"
def doEvents(self, aEvent):
print aEvent.type
|