public void UpdateChart(int fitness) { valuesList.Add(fitness); // Remove the first element if it exceeds the max if (valuesList.Count > 10) { valuesList.RemoveAt(0); startingGen++; } graph.ShowGraph(valuesList, startingGen); }
// Update is called once per frame void Update() { windowGraph.SetGetAxisLabelX((int _i) => { string levelString = FindObjectOfType <GameState>().levelNumberList[_i].ToString(); return("Level" + levelString); }); windowGraph.SetGetAxisLabelY((float _i) => { return("Acc " + "\n" + _i); }); windowGraph.ShowGraph(FindObjectOfType <GameState>().accurateShotsList); }
public void UpdateChart(int generation, int maxFitness) { valuesList.Add(maxFitness); graph.ShowGraph(valuesList); }
void Start() { windowGraph.ShowGraph(FindObjectOfType <GameState>().shotsFiredList); }