mirror of
https://github.com/Relintai/mono_sample.git
synced 2024-11-20 10:57:19 +01:00
Added an export to the test project.
This commit is contained in:
parent
6a6ed59cb4
commit
5ad26364b7
@ -11,3 +11,4 @@ position = Vector2( 515, 262 )
|
||||
[node name="TestSprite" type="Sprite" parent="Node2D"]
|
||||
texture = ExtResource( 2 )
|
||||
script = ExtResource( 1 )
|
||||
XScale = 2.0
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user