better menu
This commit is contained in:
@@ -10,13 +10,11 @@ public class ParticleSimulationScene : Node2D
|
||||
private ParticleSimulation _particleSimulation;
|
||||
public float PhysicsInterpolationFraction;
|
||||
|
||||
public void Initialize(int nParticles)
|
||||
public void Initialize(int seed, int nParticles)
|
||||
{
|
||||
_particleNodes = GetNode<Node2D>("ParticleNodes");
|
||||
GD.Randomize();
|
||||
ulong randomSeed = GD.Randi();
|
||||
GD.Seed(randomSeed);
|
||||
GD.Print("Last Seed: " + randomSeed);
|
||||
GD.Seed((ulong)seed);
|
||||
GD.Print("Last Seed: " + seed);
|
||||
var viewSize = GetViewportRect().Size;
|
||||
var zoom = GetNode<Camera2D>("Camera2D").Zoom;
|
||||
var spaceSize = new Vector2(viewSize.x * zoom.x, viewSize.y * zoom.y);
|
||||
@@ -30,7 +28,8 @@ public class ParticleSimulationScene : Node2D
|
||||
|
||||
public override void _Process(float delta)
|
||||
{
|
||||
if (Input.IsActionJustPressed("quit")) GetTree().Quit();
|
||||
if (Input.IsActionJustPressed("quit"))
|
||||
GetParent<Main>().ExitToMenu();
|
||||
if (Input.IsActionJustPressed("reset")) GetTree().ReloadCurrentScene();
|
||||
PhysicsInterpolationFraction = Engine.GetPhysicsInterpolationFraction();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user