public void ForceUpdate() { DamageTypeList armorValues; HumanBodyTakeDamage damage; if (RPOS.GetObservedPlayerComponent <HumanBodyTakeDamage>(out damage)) { armorValues = damage.GetArmorValues(); } else { armorValues = new DamageTypeList(); } this.leftText.text = string.Empty; this.rightText.text = string.Empty; for (int i = 0; i < 6; i++) { if (armorValues[i] != 0f) { this.leftText.text = this.leftText.text + TakeDamage.DamageIndexToString((DamageTypeIndex)i) + "\n"; string text = this.rightText.text; object[] objArray1 = new object[] { text, "+", (int)armorValues[i], "\n" }; this.rightText.text = string.Concat(objArray1); } } }
public void ForceUpdate() { DamageTypeList damageTypeList; HumanBodyTakeDamage humanBodyTakeDamage; damageTypeList = (!RPOS.GetObservedPlayerComponent <HumanBodyTakeDamage>(out humanBodyTakeDamage) ? new DamageTypeList() : humanBodyTakeDamage.GetArmorValues()); this.leftText.text = string.Empty; this.rightText.text = string.Empty; for (int i = 0; i < 6; i++) { if (damageTypeList[i] != 0f) { UILabel uILabel = this.leftText; uILabel.text = string.Concat(uILabel.text, TakeDamage.DamageIndexToString((DamageTypeIndex)i), "\n"); UILabel uILabel1 = this.rightText; string str = uILabel1.text; uILabel1.text = string.Concat(new object[] { str, "+", (int)damageTypeList[i], "\n" }); } } }