public void Clear() { // Debug.Log("Clear"); if (_particles == null) { _particles = new List <Particle>(); } else { _particles.Clear(); } if (_springs == null) { _springs = new List <SpringConstraint>(); } else { _springs.Clear(); } if (_angles == null) { _angles = new List <AngleConstraint>(); } else { _angles.Clear(); } if (_pins == null) { _pins = new List <PinConstraint>(); } else { _pins.Clear(); } if (_stretchs == null) { _stretchs = new List <StretchInteraction>(); } else { _stretchs.Clear(); } if (_uidDistributer == null) { _uidDistributer = new UIDDistributer(); } else { _uidDistributer.SetCounter(0); } }
/* * Methods */ public void Init(bool withClear = true) { if (!_settings) { _settings = new SimSettings(); } if (withClear) { Clear(); } _uidDistributer = new UIDDistributer(); }