private void Awake() { beamParticle = GetComponent <ParticleSystem>(); InObj = GameObject.Find("SPSlider"); Inscr = InObj.GetComponent <SPSlider>(); beamParticle.Stop(); timer = BeamTimer; }
void Update_HMSP() { HPSlider.maxValue = pStats.HP.FinalValue; MPSlider.maxValue = pStats.MP.FinalValue; SPSlider.maxValue = pStats.SP.FinalValue; HPSlider.value = pStats.HP.CurValue; MPSlider.value = pStats.MP.CurValue; SPSlider.value = pStats.SP.CurValue; MainHPSlider.maxValue = pStats.HP.FinalValue; MainHPBlur.maxValue = pStats.HP.FinalValue; MainMPSlider.maxValue = pStats.MP.FinalValue; MainSPSlider.maxValue = pStats.SP.FinalValue; MainHPSlider.value = pStats.HP.CurValue; MainMPSlider.value = pStats.MP.CurValue; MainSPSlider.value = pStats.SP.CurValue; if (pStats.bIsAlive) { if (pStats.bIsDeadly) { HPSlider.GetComponentInChildren <Text>().text = string.Format("<color=#B200BEFF>DEADLY</color> <color=#FF0000FF>({0})</color>", pStats.HP.CurValue.ToString("0")); MainHPSlider.GetComponentInChildren <Text>().text = string.Format("<color=#B200BEFF>DEADLY </color> <color=#FF0000FF>({0})</color>", pStats.HP.CurValue.ToString("0")); } else { HPSlider.GetComponentInChildren <Text>().text = HPSlider.value.ToString("0") + "/" + HPSlider.maxValue.ToString("0"); MainHPSlider.GetComponentInChildren <Text>().text = MainHPSlider.value.ToString("0") + "/" + MainHPSlider.maxValue.ToString("0"); } } else { HPSlider.GetComponentInChildren <Text>().text = string.Format("<color=#B200BEFF>DEAD</color>", HPSlider.value.ToString("0"), HPSlider.maxValue.ToString("0")); MainHPSlider.GetComponentInChildren <Text>().text = string.Format("<color=#B200BEFF>DEAD</color>", MainHPSlider.value.ToString("0"), MainHPSlider.maxValue.ToString("0")); } MPSlider.GetComponentInChildren <Text>().text = MPSlider.value.ToString("0") + "/" + MPSlider.maxValue.ToString("0"); SPSlider.GetComponentInChildren <Text>().text = SPSlider.value.ToString("0") + "/" + SPSlider.maxValue.ToString("0"); MainMPSlider.GetComponentInChildren <Text>().text = MainMPSlider.value.ToString("0") + "/" + MainMPSlider.maxValue.ToString("0"); }