fix collectibles not working
This commit is contained in:
parent
ca947c2f09
commit
8d2c0248e1
3 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ func _ready():
|
||||||
|
|
||||||
func _on_Area2D_body_entered(body):
|
func _on_Area2D_body_entered(body):
|
||||||
#Collect
|
#Collect
|
||||||
if body.is_in_group("player_hitbox"):
|
if body.is_in_group("player"):
|
||||||
Audio.play_shard_sound()
|
Audio.play_shard_sound()
|
||||||
Game.score += 500
|
Game.score += 500
|
||||||
Game.shards += value
|
Game.shards += value
|
||||||
|
|
|
@ -28,7 +28,7 @@ func _set_color(value):
|
||||||
|
|
||||||
func _on_Area2D_body_entered(body):
|
func _on_Area2D_body_entered(body):
|
||||||
#Collect
|
#Collect
|
||||||
if body.is_in_group("player_hitbox"):
|
if body.is_in_group("player"):
|
||||||
Audio.play_sound(Audio.a_star,Audio.ac_collectible)
|
Audio.play_sound(Audio.a_star,Audio.ac_collectible)
|
||||||
Game.score += 100
|
Game.score += 100
|
||||||
Game.stars[color] = true
|
Game.stars[color] = true
|
||||||
|
|
|
@ -54,7 +54,7 @@ script = ExtResource( 3 )
|
||||||
material = SubResource( 10 )
|
material = SubResource( 10 )
|
||||||
position = Vector2( -1, -3 )
|
position = Vector2( -1, -3 )
|
||||||
frames = SubResource( 8 )
|
frames = SubResource( 8 )
|
||||||
frame = 3
|
frame = 2
|
||||||
playing = true
|
playing = true
|
||||||
centered = false
|
centered = false
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue