animate wall bumps
This commit is contained in:
parent
1c9fc2de85
commit
787210847b
1 changed files with 1 additions and 2 deletions
3
piece.gd
3
piece.gd
|
|
@ -51,14 +51,13 @@ func do_step(board: Board):
|
||||||
# ball being collided *with* gets the remainder of the momentum
|
# ball being collided *with* gets the remainder of the momentum
|
||||||
# EMERGENT COMPLEXITY!??!?
|
# EMERGENT COMPLEXITY!??!?
|
||||||
if board.solid_at(new_pos):
|
if board.solid_at(new_pos):
|
||||||
|
do_bump(move).call()
|
||||||
var ball_here := board.type_at(new_pos, Piece.Type.Ball)
|
var ball_here := board.type_at(new_pos, Piece.Type.Ball)
|
||||||
if ball_here:
|
if ball_here:
|
||||||
do_bump(move).call()
|
|
||||||
var rem := lvel % 2
|
var rem := lvel % 2
|
||||||
ball_here.do_push(lvel/2 + rem).call()
|
ball_here.do_push(lvel/2 + rem).call()
|
||||||
lvel = -lvel/2
|
lvel = -lvel/2
|
||||||
else:
|
else:
|
||||||
lpos = lpos
|
|
||||||
lvel -= move
|
lvel -= move
|
||||||
return
|
return
|
||||||
lpos = new_pos
|
lpos = new_pos
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue