Small fixes
This commit is contained in:
parent
1c7e6cf814
commit
1e3ed6a55d
11 changed files with 92 additions and 12 deletions
|
|
@ -2,17 +2,16 @@ 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
|
||||
emitting = true
|
||||
tween.tween_interval(2.)
|
||||
tween.tween_callback(func():
|
||||
particles.emitting = false
|
||||
emitting = false
|
||||
for gas in gasses:
|
||||
inventory.extract_substance(gas.substance.get_formula(),gas.amount)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue