示例#1
0
 private void UpdateSheild()
 {
     if (HPLeft <= 1)//Sheilds Down
     {
         Sheild.gameObject.SetActive(false);
     }
     else
     {
         float sheildPercent = 1 - (float)(HPLeft - 1) / (HPCap - 1);
         Sheild.material.color = new Color(Red.Evaluate(sheildPercent), Green.Evaluate(sheildPercent), Blue.Evaluate(sheildPercent), .6f);
     }
 }