static_object.gd 308 B

1234567891011121314151617
  1. extends StaticBody2D
  2. var should_clean := false # offset of one frame (or two)
  3. func _process(delta):
  4. if should_clean:
  5. set_modulate(Color.WHITE)
  6. should_clean = false
  7. elif get_modulate() != Color.WHITE:
  8. should_clean = true
  9. func paint() -> void:
  10. set_modulate(Color.HOT_PINK)
  11. should_clean = false