Exemplo n.º 1
0
 public void setHP(float hpCurrent)
 {
     if (initialized)
     {
         float hpMax  = (float)PlayerCharacter.instance.MaxHP,
               hpFrac = hpCurrent / hpMax;
         lifebar.setInstant(hpFrac);
         int    count      = UnitaleUtil.DecimalCount(hpCurrent);
         string sHpCurrent = hpCurrent < 10 ? "0" + hpCurrent.ToString("F" + count) : hpCurrent.ToString("F" + count);
         string sHpMax     = hpMax < 10 ? "0" + hpMax : "" + hpMax;
         hpTextMan.SetText(new TextMessage(sHpCurrent + " / " + sHpMax, false, true));
     }
 }