void FixedUpdate() { World.Update(4); //Keep in bounds foreach (Composite c in World.composites) { foreach (Particle p in c.particles) { p.pos = new Vector2(Mathf.Clamp(p.pos.x, 0, width), Mathf.Clamp(p.pos.y, -height, 0)); } } }
// Update is called once per frame void Update() { if (!isStarted) { UpdateLinks(); } if (isStarted && !toggle.isOn) { verlet.Update(); UpdateView(); UpdateLinks(); } }
protected virtual void Update() { _verlet.Update(); BuildMesh(); }