Ejemplo n.º 1
0
 public bool PlayerHpHeal(float amount, PotionPowerType type)
 {
     se.Play(9);
     if (psController.Hp == psController.MaxHp)
     {
         return(false);
     }
     if (type == PotionPowerType.Integer)
     {
         psController.Hp += Mathf.RoundToInt(amount);
     }
     else if (type == PotionPowerType.Percentage)
     {
         //퍼센트의 경우 amount 0~100으로 값을 받게됨
         psController.Hp += Mathf.RoundToInt(amount * 0.01f * psController.MaxHp);
     }
     return(true);
 }
Ejemplo n.º 2
0
 public bool PlayerSpHeal(float amount, PotionPowerType type)
 {
     se.Play(9);
     if (psController.Sp == psController.MaxSp)
     {
         return(false);
     }
     if (type == PotionPowerType.Integer)
     {
         psController.Sp += Mathf.RoundToInt(amount);
     }
     else if (type == PotionPowerType.Percentage)
     {
         //퍼센트의 경우 amount 0~100으로 값을 받게됨
         psController.Sp += Mathf.RoundToInt(amount * 0.01f * psController.MaxSp);
         //AddGameLog(amount.ToString() + "회복");
     }
     return(true);
 }