/// <summary> /// Init this instance. Call this inside Start() to instantiate the integrator /// otherwise, it'll be created in the Property in the first frame /// </summary> public void Init() { _Settings = SettingsSlot; if (!overrideGlobalSetting) { _Settings = SimulationManager.Instance.settings; } else { if (SettingsSlot == null) { _Settings = SimulationManager.Instance.settings; } } if (Application.isPlaying) { setIntegrator(); } else { return; } }
protected IntegratorBase(Simulation sim) { this.sim = sim; this.lastUpdateTime = new System.Random().Next(10000) / 10000f + Time.realtimeSinceStartup; this.setting = sim.Settings; }