Graphics pass
This commit is contained in:
parent
51af0ea751
commit
fb47693a99
42 changed files with 821 additions and 95 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue