adjustements for new pad
36
NS.py
|
@ -466,8 +466,20 @@ class LevelSelect(Animation):
|
||||||
y = 250
|
y = 250
|
||||||
indent = 10
|
indent = 10
|
||||||
dsr = self.get_display_surface().get_rect()
|
dsr = self.get_display_surface().get_rect()
|
||||||
self.platforms = [Platform(self, (0, y)), Platform(self, (dsr.centerx, y)), Platform(self, (0, y))]
|
self.platforms = [Platform(self, (0, y)), Platform(self, (0, y)), Platform(self, (0, y))]
|
||||||
|
scale = .75
|
||||||
|
for platform in self.platforms:
|
||||||
|
for ii, frame in enumerate(platform.view.frames):
|
||||||
|
scaled = pygame.transform.smoothscale(frame, (int(frame.get_width() * scale), int(frame.get_height() * scale)))
|
||||||
|
platform.view.frames[ii] = scaled
|
||||||
|
platform.view.get_current_frameset().measure_rect()
|
||||||
|
platform.view.update_location_size()
|
||||||
|
for corner in platform.glow_masks:
|
||||||
|
for ii, frame in enumerate(corner):
|
||||||
|
scaled = pygame.transform.smoothscale(frame, (int(frame.get_width() * scale), int(frame.get_height() * scale)))
|
||||||
|
corner[ii] = scaled
|
||||||
self.platforms[0].view.location.left = dsr.left + indent
|
self.platforms[0].view.location.left = dsr.left + indent
|
||||||
|
self.platforms[1].view.location.centerx = dsr.centerx
|
||||||
self.platforms[2].view.location.right = dsr.right - indent
|
self.platforms[2].view.location.right = dsr.right - indent
|
||||||
self.platforms[0].set_glowing((NS.LNW, NS.LSE))
|
self.platforms[0].set_glowing((NS.LNW, NS.LSE))
|
||||||
self.platforms[1].set_glowing((NS.LNW, NS.LSW))
|
self.platforms[1].set_glowing((NS.LNW, NS.LSW))
|
||||||
|
@ -1963,9 +1975,8 @@ class Boss(Animation):
|
||||||
self.boss_sprites[-1].load_from_path(path.joinpath(f"{prefix}Boil"), True)
|
self.boss_sprites[-1].load_from_path(path.joinpath(f"{prefix}Boil"), True)
|
||||||
self.boss_sprites[-1].add_frameset(name="hurt", switch=True)
|
self.boss_sprites[-1].add_frameset(name="hurt", switch=True)
|
||||||
self.boss_sprites[-1].load_from_path(path.joinpath(f"{prefix}Hit"), True)
|
self.boss_sprites[-1].load_from_path(path.joinpath(f"{prefix}Hit"), True)
|
||||||
if path.joinpath(f"{prefix}Death").exists():
|
self.boss_sprites[-1].add_frameset(name="death", switch=True)
|
||||||
self.boss_sprites[-1].add_frameset(name="death", switch=True)
|
self.boss_sprites[-1].load_from_path(path.joinpath(f"{prefix}Death"), True)
|
||||||
self.boss_sprites[-1].load_from_path(path.joinpath(f"{prefix}Death"), True)
|
|
||||||
self.boss_sprites[-1].add_frameset(name="entrance", switch=True)
|
self.boss_sprites[-1].add_frameset(name="entrance", switch=True)
|
||||||
self.boss_sprites[-1].load_from_path(path.joinpath(f"{prefix}Intro"), True)
|
self.boss_sprites[-1].load_from_path(path.joinpath(f"{prefix}Intro"), True)
|
||||||
self.boss_sprites[-1].location.topleft = 207, 10
|
self.boss_sprites[-1].location.topleft = 207, 10
|
||||||
|
@ -2338,10 +2349,7 @@ class Boss(Animation):
|
||||||
self.queue = []
|
self.queue = []
|
||||||
self.brandish_complete = True
|
self.brandish_complete = True
|
||||||
if win:
|
if win:
|
||||||
if "death" in [str(frameset) for frameset in self.level_sprite().framesets]:
|
self.level_sprite().set_frameset("hurt")
|
||||||
self.level_sprite().set_frameset("death")
|
|
||||||
else:
|
|
||||||
self.level_sprite().set_frameset("hurt")
|
|
||||||
if self.get_configuration("system", "enable-level-select"):
|
if self.get_configuration("system", "enable-level-select"):
|
||||||
self.get_game().add_time_to_scores(self.time_elapsed, self.level_index)
|
self.get_game().add_time_to_scores(self.time_elapsed, self.level_index)
|
||||||
elif self.level_index == 2:
|
elif self.level_index == 2:
|
||||||
|
@ -2992,12 +3000,18 @@ class Ending(Animation):
|
||||||
"""
|
"""
|
||||||
Add a sword to the list based on what button is pressed. Remove swords that are out of view.
|
Add a sword to the list based on what button is pressed. Remove swords that are out of view.
|
||||||
"""
|
"""
|
||||||
if self.get_game().platform.get_edge_pressed() is not None:
|
edge = self.get_game().platform.get_edge_pressed()
|
||||||
|
if edge is not None:
|
||||||
sprite = Sprite(self)
|
sprite = Sprite(self)
|
||||||
# Add frames from Boss->Sword storage
|
# Add frames from Boss->Sword storage
|
||||||
for frame in self.get_game().boss.sword.swords[0][self.get_game().platform.get_edge_pressed()]:
|
for frame in self.get_game().boss.sword.swords[0][edge]:
|
||||||
sprite.add_frame(frame)
|
sprite.add_frame(frame)
|
||||||
sprite.location.center = self.slime_bag.location.center
|
if edge == NS.W:
|
||||||
|
sprite.location.midleft = self.slime_bag.location.midleft
|
||||||
|
elif edge == NS.E:
|
||||||
|
sprite.location.midright = self.slime_bag.location.midright
|
||||||
|
else:
|
||||||
|
sprite.location.center = self.slime_bag.location.center
|
||||||
self.swords.append(sprite)
|
self.swords.append(sprite)
|
||||||
outgoing = []
|
outgoing = []
|
||||||
for sword in self.swords:
|
for sword in self.swords:
|
||||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 380 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 421 B After Width: | Height: | Size: 552 B |
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 507 B |
|
@ -9,12 +9,15 @@
|
||||||
24404 0
|
24404 0
|
||||||
33896 0
|
33896 0
|
||||||
59424 0
|
59424 0
|
||||||
|
64471 0
|
||||||
10329 1
|
10329 1
|
||||||
10718 1
|
10718 1
|
||||||
18586 1
|
18586 1
|
||||||
21561 1
|
21561 1
|
||||||
33442 1
|
33442 1
|
||||||
|
68561 1
|
||||||
71763 1
|
71763 1
|
||||||
|
95630 1
|
||||||
9474 2
|
9474 2
|
||||||
10286 2
|
10286 2
|
||||||
10433 2
|
10433 2
|
||||||
|
|