Esempio n. 1
0
 void OnStartBlock()
 {
     if (playerCombat != null)
     {
         playerCombat.Block(true);
     }
 }
Esempio n. 2
0
 public void LightDamage()
 {
     if (stamina < LightCost)
     {
         Sleep();
     }
     else
     {
         stamina = stamina - LightCost;
         anim.SetInteger("State", 2);
         if (Vector3.Distance(target, transform.position) < 2.5f)
         {
             int chance;
             chance = Random.Range(1, 100);
             if (chance < lightChance)
             {
                 playerFunction.TakeLightDamage();
             }
             else
             {
                 playerFunction.Block();
             }
         }
         else
         {
             playerFunction.Miss();
         }
         NextTurn();
     }
 }