diff --git a/game/Main.tscn b/game/Main.tscn index 1c283cf..0b8edbe 100644 --- a/game/Main.tscn +++ b/game/Main.tscn @@ -11,3 +11,4 @@ position = Vector2( 515, 262 ) [node name="TestSprite" type="Sprite" parent="Node2D"] texture = ExtResource( 2 ) script = ExtResource( 1 ) +XScale = 2.0 diff --git a/game/TestSprite.cs b/game/TestSprite.cs index c791166..8bb1390 100644 --- a/game/TestSprite.cs +++ b/game/TestSprite.cs @@ -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); } }