10 lines
189 B
GDScript
10 lines
189 B
GDScript
|
class_name BallButton
|
||
|
extends GroundButton
|
||
|
|
||
|
@export var ball: Ball
|
||
|
|
||
|
func _flip():
|
||
|
sprite.frame = 1 if is_active else 0
|
||
|
if is_active and ball and not ball.can_roll:
|
||
|
ball.can_roll = true
|