public Color theShowColorForSELFUp = Color.green; //显示的颜色,回血效果 public void makeShowForHpUp(float hpup = 0) { if (theShowTextForUp == null || !theShowTextForUp.gameObject.activeInHierarchy || theShowTextForUp.thePlayer != this.thePlayer) { GameObject theOBJ = systemValues.getTextFromTextPool(); theShowTextForUp = theOBJ.GetComponent <extraMoveUp> (); theShowTextForUp.thePlayer = this.thePlayer; reSetText(theShowTextForUp, hpup.ToString("f0"), 2); } else { theShowTextForUp.makeUpdate(hpup); } }
public void makeShowForDamage(float damage = 0) { if (damage <= 0) { return; } if (theShowText == null || !theShowText.gameObject.activeInHierarchy || theShowText.thePlayer != this.thePlayer) { GameObject theOBJ = systemValues.getTextFromTextPool(); theShowText = theOBJ.GetComponent <extraMoveUp> (); theShowText.thePlayer = this.thePlayer; theShowText.valueSave = damage; int colorNumber = this.thePlayer == systemValues.thePlayer ? 1 : 0; reSetText(theShowText, damage.ToString("f0"), colorNumber); } else { //print ("update"); theShowText.makeUpdate(damage); } }