|
@@ -19,14 +19,17 @@ func _ready() -> void:
|
|
|
|
|
|
func _physics_process(delta: float) -> void:
|
|
|
var impact: KinematicCollision2D = move_and_collide(_mouvement * delta)
|
|
|
- if impact != null:
|
|
|
- _rebondir(impact)
|
|
|
- var obstacle: Object = impact.get_collider()
|
|
|
- if obstacle is Raquette and en_train_de_monter():
|
|
|
- _orienter_tir(obstacle)
|
|
|
- _accelerer()
|
|
|
- elif obstacle is Brique:
|
|
|
- _impacter_brique(obstacle)
|
|
|
+
|
|
|
+ if impact == null:
|
|
|
+ return # pas d'impact a gerer
|
|
|
+
|
|
|
+ _rebondir(impact)
|
|
|
+ var obstacle: Object = impact.get_collider()
|
|
|
+ if obstacle is Raquette and en_train_de_monter():
|
|
|
+ _orienter_tir(obstacle)
|
|
|
+ _accelerer()
|
|
|
+ elif obstacle is Brique:
|
|
|
+ _impacter_brique(obstacle)
|
|
|
|
|
|
|
|
|
## Recopie les proprietes utiles de l'autre balle
|