thrust_effect.gd 286 B

123456789101112131415
  1. class_name ThrustEffect
  2. extends GPUParticles2D
  3. @onready var smoke_emitter: GPUParticles2D = $Smoke
  4. func _on_thrusted(power: float) -> void:
  5. if power == 0.0 :
  6. set_emitting(false)
  7. smoke_emitter.set_emitting(false)
  8. else :
  9. set_emitting(true)
  10. smoke_emitter.set_emitting(true)