diff --git a/scenes/icon.tscn b/scenes/icon.tscn new file mode 100644 index 0000000..a957830 --- /dev/null +++ b/scenes/icon.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=3 uid="uid://6ws803s4tnhy"] + +[ext_resource type="Texture2D" uid="uid://bhxwkp0e2me1u" path="res://icon.png" id="1_6td5b"] +[ext_resource type="Script" path="res://scripts/icon.gd" id="2_hmv6m"] + +[node name="Icon" type="Sprite2D"] +position = Vector2(577, 294) +texture = ExtResource("1_6td5b") +script = ExtResource("2_hmv6m") diff --git a/scripts/icon.gd b/scripts/icon.gd new file mode 100644 index 0000000..4695b05 --- /dev/null +++ b/scripts/icon.gd @@ -0,0 +1,11 @@ +extends Sprite2D + +var speed = 400 +var angular_speed = PI + +func _process(delta: float) -> void: + rotation += angular_speed * delta + + var velocity = Vector2.UP.rotated(rotation) * speed + + position += velocity * delta