Exemple #1
0
 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);
 }
Exemple #2
0
    // 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);
 }