예제 #1
0
 // Use this for initialization
 new void Start()
 {
     Garenanim = this.GetComponent <Animator>();
     this.ResetCooldowns();
     this.SetStats();
     this.SetImages();
     this.SetTexts();
     this.SetLifeBar();
     this.ECollider = GameObject.FindGameObjectWithTag("GarenECollider").GetComponent <GarenEColliderScript>();
     base.Start();
 }
예제 #2
0
    /// <summary>
    /// Manages E's cooldown
    /// </summary>

    public IEnumerator CorrutinaE()
    {
        if (!ECollider)
        {
            this.ECollider = GameObject.FindGameObjectWithTag("GarenECollider").GetComponent <GarenEColliderScript>();
        }

        Garenanim.SetBool("Etime", true);
        cooldownE = false;
        for (int i = 0; i < timerE; i++)
        {
            ECollider.isactive = true;
            ECollider.DoDamage();
            yield return(new WaitForSeconds(Etime / 5));
        }
        ECollider.enabled = false;
        Ecooldowntime     = 15;
        Images[4].GetComponent <Image>().enabled = true;
        Images[5].GetComponent <Image>().enabled = true;
        Texts[3].GetComponent <Text>().enabled   = true;
        cooldownE = true;
        Garenanim.SetBool("Etime", false);
    }