This commit is contained in:
Rendo 2026-06-29 00:20:57 +05:00
commit 49b09b9bb8
9 changed files with 77 additions and 12 deletions

18
scenes/bubbles.gd Normal file
View file

@ -0,0 +1,18 @@
extends GPUParticles3D
@export var inventory: Inventory
@export var particles: GPUParticles3D
var tween: Tween
func _on_inventory_reacted_with_gasses(gasses: Array[RuntimeSubstanceData]) -> void:
if tween:
tween.kill()
tween = create_tween()
particles.emitting = true
tween.tween_interval(2.)
tween.tween_callback(func():
particles.emitting = false
for gas in gasses:
inventory.extract_substance(gas.substance.get_formula(),gas.amount)
)