public void Execute() { int i_score = 0; for (int i = 0; i < na_populationEntities.Length; i++) { Entity populationEntity = na_populationEntities [i]; NNBrainScoreComponent brainScore = a_brainScore [populationEntity]; i_score += brainScore.i; // Debug.Log ( "* Current scoring: " + i + " / " + na_populationEntities.Length + "; in " + populationEntity + " >> " + brainScore.i + "; total: " + i_score ) ; } // for na_totalScore [0] = i_score; // Debug.LogWarning ( "* Total scoring: " + i_score ) ; }
public void Execute( ) { // int i_actualIndex = 0 ; a_indexProbability.ResizeUninitialized(0); for (int i_entityIndex = 0; i_entityIndex < na_populationEntities.Length; i_entityIndex++) { Entity populationEntity = na_populationEntities [i_entityIndex].entity; NNBrainScoreComponent brainScore = a_brainScore [populationEntity]; // Debug.Log ( "probability Current scoring: " + i_entityIndex + " / " + na_populationEntities.Length + "; entity: " + populationEntity + " >> " + brainScore.i + "; actual: " + i_actualIndex ) ; bool canStopCheckingIndexProbability = false; for (int j = 0; j < brainScore.i; j++) { // canStopCheckingIndexProbability = i_actualIndex >= a_indexProbability.Length ; if (canStopCheckingIndexProbability) { break; } a_indexProbability.Add(new NNINdexProbabilityBuffer() { i = i_entityIndex }); // a_indexProbability [i_actualIndex] = new NNINdexProbabilityBuffer () { i = i_entityIndex } ; // i_actualIndex ++ ; } // if ( canStopCheckingIndexProbability ) break ; } // for }