pause now is not mandatory

This commit is contained in:
Rendo 2025-07-17 20:57:18 +05:00
commit 5d4ae478dc
7 changed files with 31 additions and 8 deletions

View file

@ -8,13 +8,12 @@ public partial class SunSpawner : Node
public int MinSun = 25;
[Export]
public int MaxSun = 25;
[Export]
private PackedScene SunScene;
public void Spawn()
{
float x = GD.Randf()*9*FieldParams.TileWidth;
float x = GD.Randf() * 9 * FieldParams.TileWidth;
uint y = GD.Randi() % 5;
var sun = SunScene.Instantiate<Sun>();
@ -23,7 +22,7 @@ public partial class SunSpawner : Node
sun.GlobalPosition = new Vector2(FieldParams.LeftFieldBoundary.X + x, -90);
var moveTween = CreateTween();
moveTween.TweenProperty(sun,"global_position", new Vector2(FieldParams.LeftFieldBoundary.X + x,
FieldParams.LeftFieldBoundary.Y + FieldParams.TileHeight * y + FieldParams.TileHeight/2.0f),9-y);
moveTween.TweenProperty(sun, "global_position", new Vector2(FieldParams.LeftFieldBoundary.X + x,
FieldParams.LeftFieldBoundary.Y + FieldParams.TileHeight * y + FieldParams.TileHeight / 2.0f), 9 - y);
}
}