Пример #1
0
 public bool areaAttack()
 {
     if (skills[2].getCdLeft() == 0 && manaCheck(skills[2]))
     {
         opponent.loseHP(areaAtkDmg);
         monsterGO = GameObject.FindGameObjectWithTag(monsterOpponent);
         if (monsterGO != null)
         {
             ms = monsterGO.GetComponent <MonsterStats>();
             ms.loseHP(areaAtkDmg);
         }
         player.loseMP(skills[2].getMana());
         skills[2].setCooldown();
         return(true);
     }
     return(false);
 }
Пример #2
0
 public bool attackMonster()
 {
     monsterGO = GameObject.FindGameObjectWithTag(monsterOpponent);
     if (monsterGO != null)
     {
         ms = monsterGO.GetComponent <MonsterStats>();
         if (skillNumber == 7)
         {
             ms.setIsFreezed(true);
         }
         else
         {
             ms.loseHP(hp);
         }
         player.loseMP(mp);
         skills[skillNumber].setCooldown();
         return(true);
     }
     return(false);
 }