Fader.gd 383 B

123456789101112131415
  1. extends Polygon2D
  2. # Declare member variables here. Examples:
  3. # var a = 2
  4. # var b = "text"
  5. # Called when the node enters the scene tree for the first time.
  6. func _ready():
  7. visible = true
  8. var tween = Tween.new()
  9. add_child(tween)
  10. var anitime = 1
  11. tween.interpolate_property(self,"modulate",Color(1,1,1,1),Color(1,1,1,0),anitime,Tween.TRANS_CUBIC,Tween.EASE_IN_OUT)
  12. tween.start()