changed to anonymous method

master
Sascha 2023-09-01 17:49:51 +07:00
parent 2cfeda9c12
commit 785658d25f
1 changed files with 1 additions and 3 deletions

@ -12,11 +12,9 @@ public partial class Abdullah : Sprite2D {
clock.WaitTime = 1;
clock.Timeout += ClockOnTimeout;
clock.Start();
Moved += OnMoved;
Moved += (x, y) => GD.Print($"Moved x={x},y={y}");
}
private static void OnMoved(float x, float y) => GD.Print($"Moved x={x},y={y}");
private void ClockOnTimeout() {
Vector2 newPosition = new(GD.RandRange(0, 500), GD.RandRange(0, 500));
Position = newPosition;