Added an export to the test project.

This commit is contained in:
Relintai 2023-06-15 00:22:39 +02:00
parent 6a6ed59cb4
commit 5ad26364b7
2 changed files with 6 additions and 2 deletions

View File

@ -11,3 +11,4 @@ position = Vector2( 515, 262 )
[node name="TestSprite" type="Sprite" parent="Node2D"]
texture = ExtResource( 2 )
script = ExtResource( 1 )
XScale = 2.0

View File

@ -7,7 +7,10 @@ public class TestSprite : Sprite
// private int a = 2;
// private string b = "text";
private float dt;
[Export]
public float XScale;
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
@ -19,7 +22,7 @@ public class TestSprite : Sprite
{
dt += delta;
Position = new Vector2((float)Math.Sin(dt) * 100, (float)Math.Cos(dt) * 100);
Position = new Vector2((float)Math.Sin(dt) * 100 * XScale, (float)Math.Cos(dt) * 200);
//Position += new Vector2(1, 1);
}
}