private IEnumerator doCheck()
    {
        yield return(new WaitForSeconds(0.1f));

        Debug.Log(targetsInRange.Count);
        for (int i = 0; i < targetsInRange.Count; i++)
        {
            NTGBattleUnitController temp = targetsInRange[i] as NTGBattleUnitController;
            if (temp != null && temp.alive)
            {
                ShootBase(temp);
                effectType = EffectType.PhysicDamage;
                temp.Hit(owner, this);
                temp.AddPassive(skillController.pBehaviours[0].passiveName, owner, skillController);
                temp.AddPassive("Blow", shooter, p: new[] { this.param[1] });
                FXHit(temp);
            }
        }
        isFly = true;
        targetsInRange.Clear();
        yield return(new WaitForSeconds(pDuration));

        Debug.Log("asdbasd" + pDuration);

        Release();
    }
    private IEnumerator deferStun(NTGBattleUnitController target)
    {
        yield return(new WaitForSeconds(2.0f));

        if (target != null && target.alive)
        {
            target.AddPassive("Stun", p: new[] { param[2] });
        }
    }
예제 #3
0
    private IEnumerator doFly()
    {
        FXEA();
        FXEB();
        FXExplode();

        //ef.parent = owner.unitUiAnchor;
        //ef.localPosition = new Vector3(0, -0.36f, 0);
        //ef.localRotation = Quaternion.identity;

        collider.enabled = true;
        yield return(new WaitForSeconds(0.1f));

        collider.enabled = false;

        NTGBattleUnitController t = null;
        var sqrMinDist            = float.MaxValue;

        foreach (NTGBattleUnitController unit in targetsInRange)
        {
            if (unit == lockedTarget)
            {
                t = lockedTarget;
                break;
            }

            var sqrDist = (unit.transform.position - transform.position).sqrMagnitude;
            if (sqrDist < sqrMinDist)
            {
                t          = unit;
                sqrMinDist = sqrDist;
            }
        }
        if (t != null)
        {
            baseValue = this.param[0] + this.param[1] * owner.level;

            t.Hit(owner, this);

            t.AddPassive("Stun", owner, p: new[] { this.param[2] });

            FXHit(t, head: true);

            skillController.StartCD();
        }

        yield return(new WaitForSeconds(2.0f));

        Release();
    }
예제 #4
0
 private void AddBuff(NTGBattleUnitController unit)
 {
     if (unit == null)
     {
         return;
     }
     foreach (NTGBattlePassiveSkillBehaviour passive in unit.passives)
     {
         if (passive.name == pBehaviour.passiveName)
         {
             break;
         }
     }
     unit.AddPassive(pBehaviour.passiveName, owner);
 }
예제 #5
0
    private IEnumerator doTest()
    {
        collider.enabled = true;
        yield return(new WaitForSeconds(0.1f));

        if (target != null && target.alive)
        {
            target.AddPassive(this.passiveName, shooter, skillController);
        }

        //Debug.Log(owner.name + " " + "have run this behaviour" + " " + owner.transform.localPosition.x);

        ShootBase(owner);
        baseValue  = this.baseValue;
        effectType = EffectType.MagicDamage;
        owner.Hit(skillController.owner, this);
        FXHit(owner);

        collider.enabled = false;

        yield return(new WaitForSeconds(0.3f));

        Release();
    }
 public override void PostHitTarget(NTGBattleUnitController target)
 {
     target.AddPassive(pBehaviour.passiveName, owner, skillController);
 }
예제 #7
0
 public override void PostHitTarget(NTGBattleUnitController target)
 {
     target.AddPassive("Slow", shooter, p: new[] { this.param[0], this.param[1] });
 }