fixed bug where acab shard was given every frame
This commit is contained in:
parent
d59533b4b1
commit
92da2106d0
1 changed files with 8 additions and 4 deletions
|
@ -1,9 +1,13 @@
|
|||
extends "res://maps/map.gd"
|
||||
|
||||
var acab_shard_has_been_collected = false
|
||||
|
||||
func _physics_process(delta):
|
||||
._physics_process(delta)
|
||||
if get_tree().get_nodes_in_group("cop").size() == 0:
|
||||
Audio.play_shard_sound()
|
||||
Game.score += 500
|
||||
Game.shards += 1
|
||||
Game.shards_collected[0] = true
|
||||
if !acab_shard_has_been_collected:
|
||||
Audio.play_shard_sound()
|
||||
Game.score += 500
|
||||
Game.shards += 1
|
||||
Game.shards_collected[0] = true
|
||||
acab_shard_has_been_collected = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue