// Use this for initialization void Start() { managerScript = manager.GetComponent <ElasticSceneManager>(); pendulum = pendulum.GetComponent <PendulumElastic>(); gravitySlider.onValueChanged.AddListener(delegate { SetGravity(); }); iterationsSlider.onValueChanged.AddListener(delegate { SetIterations(); }); partitionsSlider.onValueChanged.AddListener(delegate { SetStringParts(); }); partitionsLengthSlider.onValueChanged.AddListener(delegate { SetStringPartsLength(); }); elasticitySlider.onValueChanged.AddListener(delegate { SetStringElasticity(); }); dampingSlider.onValueChanged.AddListener(delegate { SetStringDamping(); }); ropeSegmentMassSlider.onValueChanged.AddListener(delegate { SetMassRopeSegment(); }); finalRopeSegmentMassSlider.onValueChanged.AddListener(delegate { SetLastRopeSegmentMass(); }); minStretchSlider.onValueChanged.AddListener(delegate { SetMinStretch(); }); maxStretchSlider.onValueChanged.AddListener(delegate { SetMaxStretch(); }); gravInput.onValueChanged.AddListener(delegate { InputSetGravity(); }); iterationsInput.onValueChanged.AddListener(delegate { InputSetIterations(); }); partitionsInput.onValueChanged.AddListener(delegate { InputSetStringParts(); }); partitionsLengthInput.onValueChanged.AddListener(delegate { InputSetStringPartsLength(); }); elasticitySlider.onValueChanged.AddListener(delegate { InputSetStringElasticity(); }); dampingInput.onValueChanged.AddListener(delegate { InputSetStringDamping(); }); ropeSegmentMassSlider.onValueChanged.AddListener(delegate { InputSetMassRopeSegment(); }); finalRopeSegmentMassSlider.onValueChanged.AddListener(delegate { InputSetLastRopeSegmentMass(); }); minStretchSlider.onValueChanged.AddListener(delegate { InputSetMinStretch(); }); maxStretchSlider.onValueChanged.AddListener(delegate { InputSetMaxStretch(); }); }
void Start() { pendulum.GetComponent <PendulumElastic>(); pendulum.SetMove(false); statusSimulation = States.done; startSimulation = false; }