Exemple #1
0
    public override void ExSkill()
    {
        //do damage on all enemies
        Debug.Log("Fire Mage do damage on all enemies");

        if (HeroAnimator != null)
        {
            HeroAnimator.SetBool("Skill", true);
        }
        PlayerStats.Energy -= energyCostBySkill;
        particleEffect.Play();
        fireEffect.Play();

        GameObject[] enemies = GameObject.FindGameObjectsWithTag(enemyTag);
        //Debug.Log("Number of enemies: " + enemies.Length);
        if (enemies != null && enemies.Length > 0)
        {
            float amount = 1.85f * MATKValue;
            foreach (GameObject enemy in enemies)
            {
                BaseEnemy te = enemy.GetComponent <BaseEnemy>();
                //Debug.Log(te.CurHP + ", " + amount);
                te.TakeDamage(amount);
            }
        }

        StartCoroutine("SkillDuration");
    }
Exemple #2
0
    IEnumerator SkillDuration()
    {
        yield return(new WaitForSeconds(3f));

        Debug.Log("FireMage: Boom shakalaka = =");
        particleEffect.Stop();
        fireEffect.Stop();
        HeroAnimator.SetBool("Skill", false);
    }
Exemple #3
0
    IEnumerator SkillDuration()
    {
        yield return(new WaitForSeconds(3f));

        Logger.Log("Archer: Biu Biu Biu~~~~~~~!");

        ATKSpeed.RemoveModifier(ATKSpeedModifierBySkill);
        attackRate = ATKSpeedValue;  //3 attacks per second
        particleEffect.Stop();
        arrowEffect.Stop();
        HeroAnimator.SetBool("Skill", false);
    }
Exemple #4
0
 public override void ExSkill()
 {
     //duration time
     Logger.Log("Attack Speed Up");
     if (HeroAnimator != null)
     {
         HeroAnimator.SetBool("Skill", true);
     }
     particleEffect.Play();
     arrowEffect.Play();
     ATKSpeed.AddModifier(ATKSpeedModifierBySkill);
     attackRate = ATKSpeedValue;
     StartCoroutine("SkillDuration");
 }
Exemple #5
0
    protected override void Attack()
    {
        if (HeroAnimator != null)
        {
            HeroAnimator.SetBool("CanAttack", true);
        }
        GameObject bulletGO = (GameObject)Instantiate(bulletPrefab, firePoint.position, firePoint.rotation);
        Bullet     bullet   = bulletGO.GetComponent <Bullet>();

        bullet.ATK            = 0.33f * ATKValue;
        bullet.ACC            = ACCValue;
        bullet.criticalDamage = CritDMGValue;
        bullet.critical       = CritValue;
        bullet.MATK           = MATKValue;
        if (bullet != null)
        {
            bullet.Seek(Target);
        }
    }
Exemple #6
0
 private void GoToSkillEndAnimation()
 {
     HeroAnimator.GoToAnimation("SkillOver");
     HeroAnimator.AddNextAnimation("Run");
 }
Exemple #7
0
 private void GoToSkillAnimation()
 {
     HeroAnimator.GoToAnimation("SkillStart");
     HeroAnimator.AddNextAnimation("Skill");
 }
Exemple #8
0
 void OnCharacterCreated(UMAData obj)
 {
     heroAnimator = GetComponent <HeroAnimator> ();
     heroAnimator.OnAvatarCreated();
 }