Changement du spawn de la balle #34
|
@ -383,7 +383,20 @@ def __bonus_touched(ball: Entity, bonus: Entity):
|
|||
player = ball.world.query(LastPlayerTurn).pop()
|
||||
match bonus[Bonus]:
|
||||
case Bonus.MULTI:
|
||||
__spawn_ball(bonus.world)
|
||||
velo = Vec2(ball[Velocity])
|
||||
velo.y *= -1
|
||||
bonus.world.new_entity().set(
|
||||
SpriteBundle(
|
||||
"ball.png",
|
||||
0,
|
||||
ball[Position],
|
||||
Vec2(40, 40),
|
||||
Vec2(0.5),
|
||||
),
|
||||
Ball(),
|
||||
Velocity(velo),
|
||||
CollisionHandler(__collision_with_ball),
|
||||
)
|
||||
ball.world[TimeUntilBonus].start(ball.world)
|
||||
case Bonus.BIG:
|
||||
player[Scale] *= 2
|
||||
|
|
Loading…
Reference in a new issue