Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (playerStatus.abilityList[playerStatus.currentAbilitySelectNumbe].ability == 0)
     {
         frontSPBar.color      = Color.blue;
         frontSPBar.fillAmount = (float)playerStatus.abilityList[playerStatus.currentAbilitySelectNumbe].Sp * playerStatus.SPRecoverPower * playerStatus.GetSpboostMag() / playerStatus.MaxSP;
         backSPBar.fillAmount  = (float)playerStatus.abilityList[playerStatus.currentAbilitySelectNumbe].Sp * playerStatus.SPRecoverPower * playerStatus.GetSpboostMag() / playerStatus.MaxSP;
     }
     else
     {
         if (playerStatus.abilityList[playerStatus.currentAbilitySelectNumbe].Sp > playerStatus.MaxSP)
         {
             frontSPBar.color = Color.red;
         }
         else
         {
             frontSPBar.color = playerFrontUseSPBarColor;
         }
         frontSPBar.fillAmount = (float)playerStatus.abilityList[playerStatus.currentAbilitySelectNumbe].Sp / playerStatus.MaxSP;
         backSPBar.fillAmount  = (float)playerStatus.abilityList[playerStatus.currentAbilitySelectNumbe].Sp / playerStatus.MaxSP;
     }
 }