Ejemplo n.º 1
0
    public override IEnumerator SkillRoutine(CustomCharacterController cc, Vector3 origin)
    {
        yield return(new WaitForSeconds(0.5f));

        Sequence s = DOTween.Sequence();

        //Move To Enemy
        Vector3 movePoint = new Vector3(enemy.transform.position.x - targetOffset, enemy.transform.position.y, enemy.transform.position.z);

        s.Append(actor.transform.DOMove(movePoint, moveToDuration));
        yield return(new WaitForSeconds(moveToDuration));

        //Wind Up
        Vector3 rotate = new Vector3(windUp - actor.transform.rotation.x, 90, 0);

        s.Append(actor.transform.DORotate(rotate, windUpDuration));
        s.Append(actor.transform.DOPunchScale(new Vector3(2, 2, 2), windUpDuration, 5, 0.5f));
        yield return(new WaitForSeconds(windUpDuration));

        //Slam
        rotate = new Vector3(slam + actor.transform.rotation.x, 90, 0);
        s.Append(actor.transform.DORotate(rotate, slamDuration));

        DealDamage(enemy, Damage);

        //Add Bleed buff to enemy
        BuffReciever bReceiver = enemy.GetComponent <BuffReciever>();

        if (bReceiver.FindBuff(_BleedDebuff) == false)
        {
            bReceiver.AddBuff(_BleedDebuff);
        }
        else
        {
            bReceiver.FindBuff(_BleedDebuff).duration = _BleedDebuff.duration;
        }

        OnActivated.Invoke();

        if (audioManager)
        {
            audioManager.PlaySFX("Hit");
        }

        yield return(new WaitForSeconds(slamDuration));

        s.Append(actor.transform.DORotate(new Vector3(0, 90, 0), 0.1f));
        movePoint = origin;
        s.Append(actor.transform.DOMove(movePoint, returnDuration).OnComplete(SkillEffectEnd));
        yield return(new WaitForSeconds(returnDuration));

        cc.OnDestinationReach.Invoke();
    }
Ejemplo n.º 2
0
    public void Effect()
    {
        actor.GetComponent <Character>().Mana -= cost;

        _ReduceDamageBuff.BaseValue = _Intensity.Levels[IntensityLevel - 1].IDatas.First();

        foreach (var item in SingletonManager.Get <FieldManager>().SpawnedAllies)
        {
            BuffReciever bReceiver = item.GetComponent <BuffReciever>();

            if (bReceiver.FindBuff(_ReduceDamageBuff) == false)
            {
                bReceiver.AddBuff(_ReduceDamageBuff);
            }
        }
    }
Ejemplo n.º 3
0
    public IEnumerator SkillRoutine(Vector3 origin)
    {
        yield return(new WaitForSeconds(0.5f));

        Sequence s = DOTween.Sequence();

        s.Append(actor.transform.DOMoveY(riseRange, riseDuration));

        yield return(new WaitForSeconds(riseDuration));

        Vector3 rotate = new Vector3(0, 180, 0);

        s.Append(actor.transform.DOBlendableRotateBy(rotate, spinTime));
        s.Append(actor.transform.DOBlendableRotateBy(rotate, spinTime));
        s.Append(actor.transform.DOBlendableRotateBy(rotate, spinTime));
        s.Append(actor.transform.DOBlendableRotateBy(rotate, spinTime));
        if (audioManager)
        {
            audioManager.PlaySFX("Cast_Ice_Shield");
        }

        yield return(new WaitForSeconds(spinDuration));

        actor.GetComponent <Character>().Mana -= cost;

        //Buff Settings
        _DoubleAttackBuff.BaseValue = _Intensity.Levels[IntensityLevel - 1].IDatas.First();

        BuffReciever bReceiver = actor.GetComponent <BuffReciever>();

        if (bReceiver.FindBuff(_DoubleAttackBuff) == false)
        {
            bReceiver.AddBuff(_DoubleAttackBuff);
        }
        else
        {
            bReceiver.FindBuff(_DoubleAttackBuff).duration = _DoubleAttackBuff.duration;
        }

        s.Append(actor.transform.DOMove(origin, riseDuration));

        yield return(new WaitForSeconds(riseDuration));

        OnActivated.Invoke();
        base.SkillEffectEnd();
        actor.GetComponent <CustomCharacterController>().OnDestinationReach.Invoke();
    }