From df6440254659386f1eb15360f8508c322189a8f8 Mon Sep 17 00:00:00 2001 From: Segey Lapin Date: Tue, 26 Oct 2021 23:12:27 +0300 Subject: [PATCH] Added waiting.gd --- scenes/waiting.gd | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 scenes/waiting.gd diff --git a/scenes/waiting.gd b/scenes/waiting.gd new file mode 100644 index 0000000..57b8f8a --- /dev/null +++ b/scenes/waiting.gd @@ -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)