bullet.gd 235 B

12345678910111213141516
  1. class_name Bullet
  2. extends RigidBody2D
  3. var disabled := false
  4. func _ready() -> void:
  5. ($Timer as Timer).start()
  6. func disable() -> void:
  7. if disabled:
  8. return
  9. ($AnimationPlayer as AnimationPlayer).play("shutdown")
  10. disabled = true