Finishing scripting_first_script section

This commit is contained in:
Daniel Siepmann 2024-03-26 10:35:08 +01:00
parent 553cfad8ae
commit 6a7e1d0066
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,11 @@
extends Sprite2D
var speed = 400
var angular_speed = PI
func _process(delta):
rotation += angular_speed * delta
var velocity = Vector2.UP.rotated(rotation) * speed
position += velocity * delta

View file

@ -0,0 +1,9 @@
[gd_scene load_steps=3 format=3 uid="uid://bxxuj5sw4p1oy"]
[ext_resource type="Texture2D" uid="uid://d1dh0isrpxkpi" path="res://icon.svg" id="1_trp2n"]
[ext_resource type="Script" path="res://Sprite2D.gd" id="2_jok8k"]
[node name="Sprite2D" type="Sprite2D"]
position = Vector2(682, 358)
texture = ExtResource("1_trp2n")
script = ExtResource("2_jok8k")