Merge branch 'main' into multi
This commit is contained in:
commit
295a032ce5
|
@ -480,11 +480,13 @@ def __collision_with_ball(a: Entity, b: Entity):
|
||||||
"""
|
"""
|
||||||
if Ball in a:
|
if Ball in a:
|
||||||
a.world.new_entity().set(Sound("bound.mp3"))
|
a.world.new_entity().set(Sound("bound.mp3"))
|
||||||
if Player1 in b or Player2 in b and Ball in a:
|
if Player1 in b or Player2 in b:
|
||||||
|
if Ball in a:
|
||||||
# Met a jour le dernier joueur a avoir touché la balle
|
# Met a jour le dernier joueur a avoir touché la balle
|
||||||
for player in a.world.query(LastPlayerTurn):
|
for player in a.world.query(LastPlayerTurn):
|
||||||
del player[LastPlayerTurn]
|
del player[LastPlayerTurn]
|
||||||
b.set(LastPlayerTurn())
|
b.set(LastPlayerTurn())
|
||||||
|
print(b)
|
||||||
return __bounce_on_player(a, b)
|
return __bounce_on_player(a, b)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue