restore background scrolling
This commit is contained in:
parent
5faee7703c
commit
42bc7440c4
12
NS.py
12
NS.py
|
@ -1040,16 +1040,16 @@ class Logo(Sprite):
|
|||
for x in range(0, dsr.w + self.location.w, self.location.w):
|
||||
if x != 0 or y != 0:
|
||||
self.add_location((x, y))
|
||||
self.background = pygame.surface.Surface(self.get_display_surface().get_size())
|
||||
self.display_surface = self.background
|
||||
Sprite.update(self)
|
||||
self.display_surface = self.get_screen()
|
||||
|
||||
def update(self):
|
||||
"""
|
||||
Draw the background, disable parent update (performance hack)
|
||||
"""
|
||||
self.get_display_surface().blit(self.background, (0, 0))
|
||||
self.move(-1, 1)
|
||||
if self.location.right < 0:
|
||||
self.move(self.location.w)
|
||||
if self.location.top > 0:
|
||||
self.move(dy=-self.location.h)
|
||||
Sprite.update(self)
|
||||
|
||||
|
||||
class Title(Animation):
|
||||
|
|
Loading…
Reference in New Issue