forked from team-sg/hero-mark-2
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"
|
extends "res://maps/map.gd"
|
||||||
|
|
||||||
|
var acab_shard_has_been_collected = false
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
._physics_process(delta)
|
._physics_process(delta)
|
||||||
if get_tree().get_nodes_in_group("cop").size() == 0:
|
if get_tree().get_nodes_in_group("cop").size() == 0:
|
||||||
Audio.play_shard_sound()
|
if !acab_shard_has_been_collected:
|
||||||
Game.score += 500
|
Audio.play_shard_sound()
|
||||||
Game.shards += 1
|
Game.score += 500
|
||||||
Game.shards_collected[0] = true
|
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