// Update is called once per frame void FixedUpdate() { Time.timeScale = m_time_scale; float deltaTime = Time.fixedDeltaTime; m_time += deltaTime; m_interval.tick(deltaTime); m_evolution.tick(deltaTime); //Draw the lines Debug.DrawLine(m_healthLine.Point, m_healthLine.Point + m_healthLine.Direction * 100f, Color.green, deltaTime); Debug.DrawLine(m_healthLine.Point, m_healthLine.Point + m_healthLine.Direction * -100f, Color.green, deltaTime); Debug.DrawLine(m_fitnessLine.Point, m_fitnessLine.Point + m_fitnessLine.Direction * 100f, Color.cyan, deltaTime); Debug.DrawLine(m_fitnessLine.Point, m_fitnessLine.Point + m_fitnessLine.Direction * -100f, Color.cyan, deltaTime); if (m_time >= HFlineFollowCONFIG.timePerTrial) { m_time = -10000; DataCollector.Trials = DataCollector.Trials + 1; DataCollector.newRow(); HFlineFollowCONFIG.nextAiKey(); HFlineFollowCONFIG.loadScene(); } }
// Update is called once per frame void FixedUpdate() { m_interval.tick(Time.fixedDeltaTime); m_evolution.tick(Time.fixedDeltaTime); m_time += Time.fixedDeltaTime; }