randomize seed for menu
This commit is contained in:
@@ -10,9 +10,10 @@ public class ParticleSimulationScene : Node2D
|
||||
private ParticleSimulation _particleSimulation;
|
||||
public float PhysicsInterpolationFraction;
|
||||
|
||||
public void Initialize(int seed, int nParticles)
|
||||
public void Initialize(int nParticles)
|
||||
{
|
||||
_particleNodes = GetNode<Node2D>("ParticleNodes");
|
||||
var seed = GetParent<Main>().Seed;
|
||||
GD.Seed((ulong)seed);
|
||||
GD.Print("Last Seed: " + seed);
|
||||
var viewSize = GetViewportRect().Size;
|
||||
@@ -30,7 +31,8 @@ public class ParticleSimulationScene : Node2D
|
||||
{
|
||||
if (Input.IsActionJustPressed("quit"))
|
||||
GetParent<Main>().ExitToMenu();
|
||||
if (Input.IsActionJustPressed("reset")) GetTree().ReloadCurrentScene();
|
||||
if (Input.IsActionJustPressed("reset"))
|
||||
GetParent<Main>().RestartSimulation();
|
||||
PhysicsInterpolationFraction = Engine.GetPhysicsInterpolationFraction();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user