Example #1
0
 public void Cast()
 {
     if (!inCooldown)
     {
         preparing = false;
         if (CastBehavirour())
         {
             transform.parent.parent.GetComponent <SyncAnimator>().SetTrigger("attack");
             transform.parent.parent.GetComponent <SyncSFX>().PlaySound(key.ToLower(), false);
             if (controlUI && photonView.isMine)
             {
                 skillbar.StartCooldown(key, cooldownSeconds);
             }
         }
     }
     StartCoroutine(Cooldown());
 }