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
|
|
@ -1,6 +1,7 @@
|
|||
extends StaticBody2D
|
||||
|
||||
func _ready():
|
||||
var _connection = GameStats.connect("recount_pink", self, "count")
|
||||
GameStats.pinks_left += 1
|
||||
|
||||
# turns the pegs green
|
||||
|
|
@ -19,10 +20,10 @@ func make_green():
|
|||
$ScoreCounter.trigger()
|
||||
|
||||
#finally delete the old peg
|
||||
GameStats.pinks_left -= 1
|
||||
win_level()
|
||||
Engine.time_scale = 1
|
||||
queue_free()
|
||||
GameStats.recount_pink()
|
||||
|
||||
func win_level():
|
||||
if GameStats.pinks_left <= 0:
|
||||
|
|
@ -47,3 +48,7 @@ func _on_LastPegCollision_body_entered(_body):
|
|||
|
||||
func _on_Timer_timeout():
|
||||
Engine.time_scale = 1
|
||||
|
||||
# adds count of 1 for every pink peg
|
||||
func count():
|
||||
GameStats.pinks_left += 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue