some more stuff :O
This commit is contained in:
parent
60294d21dc
commit
2038b5ca7a
10 changed files with 76 additions and 29 deletions
|
@ -15,6 +15,9 @@ onready var lightning_timer: Timer = $"%LightningTimer"
|
|||
onready var clouds: Sprite = $"%Clouds"
|
||||
|
||||
|
||||
var slaughter_shard_collected := false
|
||||
|
||||
|
||||
func _spawn_lightning():
|
||||
var bolt = Lightning.instance()
|
||||
bright_sky.modulate.a = 1.0
|
||||
|
@ -27,3 +30,13 @@ func _spawn_lightning():
|
|||
tween.tween_property(bright_sky, "modulate:a", 0.0, fade_time).set_trans(Tween.TRANS_EXPO)
|
||||
tween.tween_property(clouds, "modulate", Color.white, fade_time).set_trans(Tween.TRANS_EXPO)
|
||||
lightning_timer.start(rand_range(min_interval, max_interval))
|
||||
|
||||
|
||||
func _physics_process(delta):
|
||||
._physics_process(delta)
|
||||
if get_tree().get_nodes_in_group("enemy").size() == 0:
|
||||
if not slaughter_shard_collected:
|
||||
Audio.play_shard_sound()
|
||||
Game.score += 500
|
||||
Game.shards_collected[0] = true
|
||||
slaughter_shard_collected = true
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,11 +2,4 @@ extends "res://maps/map.gd"
|
|||
|
||||
var acab_shard_has_been_collected: bool = false
|
||||
|
||||
func _physics_process(delta):
|
||||
._physics_process(delta)
|
||||
if get_tree().get_nodes_in_group("cop").size() == 0:
|
||||
if !acab_shard_has_been_collected:
|
||||
Audio.play_shard_sound()
|
||||
Game.score += 500
|
||||
Game.shards_collected[0] = true
|
||||
acab_shard_has_been_collected = true
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue