Animation d'arrivé des prjectiles
BIN
assets/story/boss_fight/projectiles_coming/0000.png
Normal file
After Width: | Height: | Size: 158 B |
BIN
assets/story/boss_fight/projectiles_coming/0001.png
Normal file
After Width: | Height: | Size: 216 B |
BIN
assets/story/boss_fight/projectiles_coming/0002.png
Normal file
After Width: | Height: | Size: 297 B |
BIN
assets/story/boss_fight/projectiles_coming/0003.png
Normal file
After Width: | Height: | Size: 374 B |
BIN
assets/story/boss_fight/projectiles_coming/0004.png
Normal file
After Width: | Height: | Size: 554 B |
BIN
assets/story/boss_fight/projectiles_coming/0005.png
Normal file
After Width: | Height: | Size: 745 B |
BIN
assets/story/boss_fight/projectiles_coming/0006.png
Normal file
After Width: | Height: | Size: 891 B |
BIN
assets/story/boss_fight/projectiles_coming/0007.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
assets/story/boss_fight/projectiles_coming/0008.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
assets/story/boss_fight/projectiles_coming/0009.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/story/boss_fight/projectiles_coming/0010.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/story/boss_fight/projectiles_coming/0011.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
assets/story/boss_fight/projectiles_coming/0012.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
|
@ -3,6 +3,7 @@ Scene de Combat final contre edmond, inspiré du combat d'omega flowey dans unde
|
|||
"""
|
||||
|
||||
from enum import Enum
|
||||
from os import kill
|
||||
import random
|
||||
|
||||
from engine import CurrentScene, Scene
|
||||
|
@ -433,23 +434,27 @@ class RainProjectiles(Vec2):
|
|||
|
||||
def __rainning_projectiles(world: World):
|
||||
while IsRunning:
|
||||
random_pos = random.randint(0, 1399)
|
||||
animation = Animation(
|
||||
"projectiles_coming",
|
||||
30,
|
||||
)
|
||||
entity = world.new_entity()
|
||||
entity.set(
|
||||
Sprite(
|
||||
world[Assets].get_texture("error"),
|
||||
Vec2(random_pos, 300),
|
||||
Vec2(random.randint(0, 1399), 300),
|
||||
4,
|
||||
),
|
||||
Animation("projectiles", 60, True),
|
||||
smooth.Speed(1.3),
|
||||
animation,
|
||||
smooth.Speed(2),
|
||||
Hurt(10),
|
||||
smooth.Target(Vec2(random_pos, 1121)),
|
||||
RainProjectiles(),
|
||||
)
|
||||
yield animation.wait()
|
||||
# yield wait(0.5)
|
||||
entity.set(smooth.Target(Vec2(entity[Sprite].position.x, 1121)))
|
||||
yield wait(0.5)
|
||||
for entity in world.query(RainProjectiles, Sprite):
|
||||
if entity[Sprite].position.y > 1120:
|
||||
if entity[Sprite].position.y > 1080:
|
||||
entity.destroy()
|
||||
|
||||
|
||||
|
|