protected void Update()
        {
            if (this.mode == ControlMode.Manual)
            {
                var types = new List <Spring.Type>()
                {
                    Spring.Type.MuscleMiddle, Spring.Type.MuscleBack
                };
                foreach (var t in types)
                {
                    this.activationData.SetActivationValue(t, Spring.Side.Left, this.activation);
                    this.activationData.SetActivationValue(t, Spring.Side.None, this.activation);
                    // a.Tuning.useFFT = false;
                    // a.DiscreteFunction.ResetValues(this.activation);
                    // a = this.activationData[t, Spring.Side.Right];
                    // a.Tuning.useFFT = false;
                    // var ra = (this.activation + 1) * 0.5f;
                    // ra = 1 - ra;
                    // ra = ra * 2 - 1;
                    // a.DiscreteFunction.ResetValues(ra);
                }
            }

            this.sim.RunMode = this.stepMode;
            if (Input.GetKey(KeyCode.Space) && this.stepMode == IterationAlgorithmMode.PerStep)
            {
                this.sim.TryToRun();
            }

            foreach (var a in this.activationData.ToActivationList())
            {
                a.Tuning.useFFT = this.fft;
            }
            if (this.loop && (this.sim.CurrentSolution as FishSimulatorOffline.Solution).IsDone)
            {
                this.sim.Restart();
            }
            if (Input.GetKeyDown(KeyCode.S))
            {
                FishActivationData.Save(this.activationData);
            }

            if (Input.GetKey(KeyCode.R))
            {
                this.fish.Init();
                this.runtimeList = this.fish.modelData.FishGraph.Nodes.ToList();
                this.problem.UpdateData(this.fish.modelData, this.activationData);
                this.sim.Restart();
            }
            if (Input.GetKeyDown(KeyCode.U))
            {
                this.UpdateActivationDataFromCurves();
            }

            if (Input.GetKeyDown(KeyCode.G))
            {
                this.activationData.RandomActivation();
                this.UpdateAnimationCurves();
            }
        }
 protected void Update()
 {
     foreach (var a in this.Activation.ToActivationList())
     {
         a.Tuning.useFFT = this.fft;
     }
     if (this.loop && (this.sim.CurrentSolution as FishSimulatorOffline.Solution).IsDone)
     {
         this.sim.Restart();
     }
     if (Input.GetKeyDown(KeyCode.S))
     {
         FishActivationData.Save(this.Activation);
     }
 }