fix erreur de supression des projectile type plui
This commit is contained in:
parent
bd7176e791
commit
61d96be632
|
@ -4,8 +4,6 @@ Scene de Combat final contre edmond, inspiré du combat d'omega flowey dans unde
|
|||
|
||||
from enum import Enum
|
||||
import random
|
||||
from tkinter import RIGHT
|
||||
from turtle import down, left, right, shapesize
|
||||
|
||||
from engine import CurrentScene, Scene
|
||||
from engine.ecs import World
|
||||
|
@ -427,22 +425,31 @@ def __create_spike(world: World, time: float):
|
|||
)
|
||||
|
||||
|
||||
class RainProjectiles(Vec2):
|
||||
"""
|
||||
TODO
|
||||
"""
|
||||
|
||||
|
||||
def __rainning_projectiles(world: World):
|
||||
while IsRunning:
|
||||
random_pos = random.randint(0, 1399)
|
||||
entity = world.new_entity()
|
||||
entity.set(
|
||||
Sprite(
|
||||
world[Assets].get_texture("error"),
|
||||
Vec2(random.randint(0, 1399), 300),
|
||||
Vec2(random_pos, 300),
|
||||
4,
|
||||
),
|
||||
Animation("projectiles", 60, True),
|
||||
smooth.Speed(1.3),
|
||||
Hurt(10),
|
||||
smooth.Target(Vec2(random_pos, 1121)),
|
||||
RainProjectiles(),
|
||||
)
|
||||
entity.set(smooth.Target(Vec2(entity[Sprite].position.x, 1121)))
|
||||
yield wait(0.5)
|
||||
if entity[Sprite].position.y >= 1080:
|
||||
for entity in world.query(RainProjectiles, Sprite):
|
||||
if entity[Sprite].position.y > 1120:
|
||||
entity.destroy()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue