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
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
[ext_resource path="res://ParticleSimulation/ParticleSimulationScene.cs" type="Script" id=1]
|
||||
|
||||
|
||||
[node name="ParticleSimulationScene" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user