Graphics pass

This commit is contained in:
Dan 2024-05-07 15:51:31 +01:00
parent 51af0ea751
commit fb47693a99
42 changed files with 821 additions and 95 deletions

View file

@ -5,6 +5,7 @@ var bee = preload("res://entities/Bee.tscn")
@onready var beehive = get_node("../Beehive")
@onready var bee_sound = get_node("BigBeeSound")
@onready var small_bee_sound = get_node("BeeSound")
var bee_count = 0
var max_bees = 100
@ -26,9 +27,12 @@ func _process(delta):
bee_count += 1
Log.pr("Bee count: " + str(bee_count))
if bee_count > 0 and small_bee_sound.playing == false:
small_bee_sound.play()
func _physics_process(delta):
bee_sound_timer += delta
if bee_sound_timer > 1.0:
if bee_sound_timer > 1.0 and bee_count > 0:
bee_sound_timer = 0.0
if randf() > 0.9:
bee_sound.play()
if randf() > 0.9 and bee_sound.playing == false:
bee_sound.play()