コード例 #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");
    }
コード例 #2
0
    IEnumerator SkillDuration()
    {
        yield return(new WaitForSeconds(3f));

        Debug.Log("FireMage: Boom shakalaka = =");
        particleEffect.Stop();
        fireEffect.Stop();
        HeroAnimator.SetBool("Skill", false);
    }
コード例 #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);
    }
コード例 #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");
 }
コード例 #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);
        }
    }