void UpdateConAttr() { UISlider conAttr; for (int i = 0; i < (int)ConsumedAttributeName.Count; i++) { conAttr = conAttrPanel.transform.Find(((ConsumedAttributeName)i).ToString() + "Bar").GetComponent <UISlider>(); conAttr.value = status.GetConsumedAttrubute((ConsumedAttributeName)i).CurValue / status.GetConsumedAttrubute((ConsumedAttributeName)i).AdjustedValue; conAttr.GetComponentInChildren <UILabel>().text = status.GetConsumedAttrubute((ConsumedAttributeName)i).CurValue.ToString("0") + " / " + status.GetConsumedAttrubute((ConsumedAttributeName)i).AdjustedValue.ToString("0"); } conAttr = conAttrPanel.transform.Find("ExpBar").GetComponent <UISlider>(); conAttr.value = status.Exp / status.ExpToLevel; conAttr.GetComponentInChildren <UILabel>().text = status.Exp.ToString("0") + " / " + status.ExpToLevel.ToString("0"); conAttrPanel.transform.Find("Level").GetComponent <UILabel>().text = "Lv. " + status.Level; }
void RecoverConsumedAttribute() { //ResourceRecover status.GetConsumedAttrubute(ConsumedAttributeName.Health).CurValue += status.GetSecondaryAttrubute(SecondaryAttributeName.HealthRecoverRate) .AdjustedValue / 10 * CONSUMED_ATTRIBUTE_RECOVER_INTERVAL; status.GetConsumedAttrubute(ConsumedAttributeName.Mana).CurValue += status.GetSecondaryAttrubute(SecondaryAttributeName.ManaRecoverRate) .AdjustedValue / 10 * CONSUMED_ATTRIBUTE_RECOVER_INTERVAL; status.GetConsumedAttrubute(ConsumedAttributeName.Energy).CurValue += status.GetSecondaryAttrubute(SecondaryAttributeName.EnergyRecoverRate) .AdjustedValue / 10 * CONSUMED_ATTRIBUTE_RECOVER_INTERVAL; }