示例#1
0
 void OnGUI()
 {
     GUI.color           = new Color(1.0f, 1.0f, 1.0f, _textAlpha);
     GUI.backgroundColor = Color.clear;
     foreach (Transform gf in rc.AllChesses)
     {
         if (!gf.GetComponent <CharacterProperty>().death)
         {
             UnNormalUI unUI = new UnNormalUI(gf);
             UIItems.Add(unUI);
         }
     }
     foreach (UnNormalUI unUI in UIItems)
     {
         int uSeg = 0;
         foreach (var pair in unUI.Cp.LastUnStatusCounter)
         {
             if (pair.Value > 0)
             {
                 GUI.Box(new Rect(unUI.StartPoint.x, unUI.StartPoint.y - seg * uSeg - diffHeight, unUI.StartPoint.width, unUI.StartPoint.height), pair.Key.ToString(), smallFloating);
                 uSeg += 1;
             }
         }
     }
     UIItems.Clear();
 }
 void OnGUI()
 {
     GUI.color = new Color(1.0f,1.0f,1.0f,_textAlpha);
     GUI.backgroundColor = Color.clear;
     foreach(Transform gf in rc.AllChesses){
         if(!gf.GetComponent<CharacterProperty>().death){
             UnNormalUI unUI = new UnNormalUI(gf);
             UIItems.Add(unUI);
         }
     }
     foreach(UnNormalUI unUI in UIItems){
         int uSeg = 0;
         foreach(var pair in unUI.Cp.LastUnStatusCounter){
             if(pair.Value>0){
                 GUI.Box(new Rect(unUI.StartPoint.x,unUI.StartPoint.y-seg*uSeg-diffHeight,unUI.StartPoint.width,unUI.StartPoint.height), pair.Key.ToString(),smallFloating);
                 uSeg+=1;
             }
         }
     }
     UIItems.Clear();
 }