Added waiting.gd

This commit is contained in:
Segey Lapin
2021-10-26 23:12:27 +03:00
parent 611c95880b
commit df64402546

25
scenes/waiting.gd Normal file
View File

@@ -0,0 +1,25 @@
extends ColorRect
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
var a = 0.0
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if visible:
a += 1.2 * delta
if a > 2.0 * PI:
a = a - 2.0 * PI
update()
func _draw():
draw_arc(rect_size / 2.0, 100, a, PI / 1.2 + a, 60, Color(1, 1, 1), 4.0, true)
draw_arc(rect_size / 2.0, 100, a + PI, PI + PI / 1.2 + a, 60, Color(1, 1, 1), 4.0, true)