various menu changes and fixes
This commit is contained in:
@@ -10,15 +10,14 @@ public class ParticleSimulationScene : Node2D
|
||||
private ParticleSimulation _particleSimulation;
|
||||
public float PhysicsInterpolationFraction;
|
||||
|
||||
public void Initialize(int nParticles)
|
||||
public void Initialize(int seed, int nParticles, float zoom)
|
||||
{
|
||||
_particleNodes = GetNode<Node2D>("ParticleNodes");
|
||||
var seed = GetParent<Main>().Seed;
|
||||
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);
|
||||
GetNode<Camera2D>("Camera2D").Zoom = new Vector2(zoom, zoom);
|
||||
var spaceSize = viewSize * zoom;
|
||||
_particleSimulation = new ParticleSimulation
|
||||
{
|
||||
SpaceSize = spaceSize
|
||||
|
||||
Reference in New Issue
Block a user