You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classScene0(object):
""" Scene n°0 Qu'es-ce qu'il se passe ? 1. Debut = Fade in sur "intro-bg.png" pendant 1.5s 2. Reste static pendant Stage1Msc 3. Fade out sur "intro-bg.png" pendant 1.5s 4. Fin = Passe à la Scene n°1 """def__init__(self):
self.step= [True, False]
self.finish=Falseself.background=pg.image.load("res/sheets/intro-bg.png")
self.alpha=0self.t=0defgetFinish(self) ->bool:
returnself.finishdefstart(self, surface: Surface, dt: float) ->None:
""" Demarre l'animation. (Fade in par default) :param dt: DeltaTime """surface.fill((0, 0, 0))
# Timerifint(self.t) ==100:
# Disable fade in and enable fade outself.step= [False, True]
elifint(self.t) ==200:
# Pass to scene n°1self.finish=Trueself.background.set_alpha(self.alpha)
self.alpha+= (5*dt) ifself.step[0] else0self.alpha-= (5*dt) ifself.step[1] else0surface.blit(self.background, (0, 0))
self.t+= (1*dt)
The text was updated successfully, but these errors were encountered:
Old code
The text was updated successfully, but these errors were encountered: