Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends Node2D
- var color = 0
- var colormult = .01
- func _ready():
- set_process(true)
- pass
- func _process(delta):
- update()
- pass
- func _draw():
- draw_rect(Rect2(color*200,0,100,100),Color(color,0,0))
- color += colormult
- if color > 1 || color < 0:
- colormult = colormult * -1
- print(color)
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement