DADADADA
This commit is contained in:
parent
e902cc4cab
commit
c3e3c520e2
|
@ -13,7 +13,7 @@ from engine.math import Vec2
|
|||
from plugins import assets, smooth
|
||||
from plugins import render
|
||||
from plugins.animation import Animation
|
||||
from plugins.inputs import Held, Pressed
|
||||
from plugins.inputs import Held
|
||||
from plugins.render import Sprite
|
||||
from plugins.assets import Assets
|
||||
from plugins.coroutine import condition, wait, Coroutine
|
||||
|
@ -118,16 +118,17 @@ class Wave:
|
|||
def __init__(self) -> None:
|
||||
self.wave_list = [
|
||||
["rainning"],
|
||||
["horizontal_left"],
|
||||
["rainning", "rainning"],
|
||||
["rainning", "horizontal_left"],
|
||||
["rainning", "horizontal_right"],
|
||||
["rainning", "zones"],
|
||||
["rainning", "horizontal_left", "zones"],
|
||||
["rainning", "spikes"],
|
||||
["rainning", "horizontal_left", "horizontal_right"],
|
||||
["rainning", "horizontal_right", "zones"],
|
||||
["horizontal_left", "horizontal_right"],
|
||||
["rainning", "rainning", "zones"],
|
||||
["rainning", "rainning", "horizontal_left", "zones"],
|
||||
["rainning", "rainning", "spikes"],
|
||||
["rainning", "horizontal_left", "horizontal_right", "zones"],
|
||||
["rainning", "spikes", "zones"],
|
||||
["rainning", "horizontal", "zones"],
|
||||
["rainning", "horizontal_left", "horizontal_right", "zones"],
|
||||
["rainning", "spikes", "zones"],
|
||||
["rainning", "horizontal_left", "horizontal_right", "zones"],
|
||||
["rainning", "spikes", "zones"],
|
||||
]
|
||||
|
||||
|
@ -152,7 +153,6 @@ def __initialize_world(world: World):
|
|||
)
|
||||
|
||||
world.new_entity().set(Coroutine(__wave(world)))
|
||||
world.new_entity().set(Coroutine(__print_time(world)))
|
||||
|
||||
world.new_entity().set(Sprite(world[Assets].get_texture("background")))
|
||||
|
||||
|
@ -446,12 +446,10 @@ def __create_zone_attack(world: World, number: int = 2):
|
|||
locate = locate2
|
||||
|
||||
|
||||
def __create_spike(world: World, number: int = 1):
|
||||
def __create_spike(world: World):
|
||||
"""
|
||||
TODO
|
||||
"""
|
||||
for _ in range(number):
|
||||
yield wait(15.0)
|
||||
temp_warning_spike = world.new_entity()
|
||||
temp_warning_spike.set(
|
||||
Sprite(
|
||||
|
@ -623,18 +621,6 @@ def __horizontal_projectile(world: World, left: bool, number: int = 10):
|
|||
entity.destroy()
|
||||
|
||||
|
||||
def __check_key_pressed(world: World):
|
||||
"""
|
||||
TODO
|
||||
"""
|
||||
pressed = world[Pressed]
|
||||
for keys in pressed:
|
||||
if keys == "a":
|
||||
world.new_entity().set(Coroutine(__create_zone_attack(world)))
|
||||
if keys == "e":
|
||||
world.new_entity().set(Coroutine(__create_spike(world)))
|
||||
|
||||
|
||||
def __update_life_bar(world: World):
|
||||
for entity in world.query(LifeBar):
|
||||
if world[Life] == 0:
|
||||
|
@ -645,14 +631,6 @@ def __update_life_bar(world: World):
|
|||
entity[Sprite].texture = surface_carre
|
||||
|
||||
|
||||
def __print_time(_world: World):
|
||||
time = 0
|
||||
while IsRunning:
|
||||
yield wait(1)
|
||||
time += 1
|
||||
print(time)
|
||||
|
||||
|
||||
def __new_game_scene() -> Scene:
|
||||
"""
|
||||
Créer une nouvelle scène
|
||||
|
@ -662,7 +640,6 @@ def __new_game_scene() -> Scene:
|
|||
[__initialize_world],
|
||||
[
|
||||
__move,
|
||||
__check_key_pressed,
|
||||
__check_hurt,
|
||||
__defeat,
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue