animate wall bumps

This commit is contained in:
mehbark 2025-05-04 19:11:45 -04:00
parent 1c9fc2de85
commit 787210847b

View file

@ -51,14 +51,13 @@ func do_step(board: Board):
# ball being collided *with* gets the remainder of the momentum
# EMERGENT COMPLEXITY!??!?
if board.solid_at(new_pos):
do_bump(move).call()
var ball_here := board.type_at(new_pos, Piece.Type.Ball)
if ball_here:
do_bump(move).call()
var rem := lvel % 2
ball_here.do_push(lvel/2 + rem).call()
lvel = -lvel/2
else:
lpos = lpos
lvel -= move
return
lpos = new_pos