add heart level, bugfixes

This commit is contained in:
zoe 2021-11-28 14:51:08 +01:00
parent 41c3dfa881
commit c30cc4589e
9 changed files with 265 additions and 36 deletions

View file

@ -15,6 +15,7 @@ func _ready():
cameraTransform.position = Vector2.ZERO
animation.play("reset")
GameStats.balls_left = GameStats.max_balls
GameStats.connect("game_won", self, "queue_free")
func _physics_process(_delta):
match state:
@ -32,7 +33,7 @@ func handle_collisions():
for collider in collider_array:
set_particle_direction(collider)
bounce_of(collider)
turn_pegs_green(collider)
call_deferred("turn_pegs_green", collider)
func turn_pegs_green(collider):
# check if pegs can be turned green

View file

@ -69,7 +69,7 @@ collision_mask = 13
mass = 90.0
physics_material_override = ExtResource( 3 )
continuous_cd = 2
contacts_reported = 4
contacts_reported = 1
contact_monitor = true
linear_velocity = Vector2( 0, -10 )
script = ExtResource( 2 )