mirror of
https://git.kittycat.homes/zoe/pegchamp.git
synced 2024-08-15 03:15:39 +00:00
add heart level, bugfixes
This commit is contained in:
parent
41c3dfa881
commit
c30cc4589e
9 changed files with 265 additions and 36 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue