Example #1
0
 private void drawBlocks()
 {
     float[] probs = mdp2D.predictThisState(host.transform.position);
     for (int i = 0; i < probs.Length; i++)
     {
         float height = probs[i];
         if (height > float.Epsilon + clampPossibility)
         {
             blocks_index[i] = true;
             blocks[i].transform.localScale = new Vector3(gridWidth, 1f, gridWidth);
             Color blend = baseColor * (1.0f - height) + boundColor * height;
             blocks[i].GetComponent <MeshRenderer>().material.SetColor("_BaseColor", blend);
             blocks[i].SetActive(true);
         }
         else
         {
             blocks_index[i] = false;
             blocks[i].SetActive(false);
         }
     }
 }