IEnumerator SkillCoroutine() { ActorProxy.PlayAnimationWithRelay(AnimationHash.Skill, target); yield return(new WaitForSeconds(0.8f)); ActorProxy.AddBuff(BuffInfos.Invincibility, 2f); yield return(new WaitForSeconds(0.2f)); }
public void Skill() { if (_spawnedTime >= skillCastedTime + effectCooltime) { skillCastedTime = _spawnedTime; ActorProxy.AddBuff(BuffInfos.HalfDamage, effectDuration); var action = new ShielderAction(); RunningAction = action; RunLocalAction(action.ActionWithSync(ActorProxy), true); } }
public override IEnumerator Action(ActorProxy actorProxy, ActorProxy targetActorProxy) { var raider = (Minion_Raider)actorProxy.baseEntity; var t = PoolManager.instance.ActivateObject(raider.pref_EffectDash.name, raider.ts_HitPos.position); if (targetActorProxy.transform != null) { t.LookAt(targetActorProxy.transform.position); } raider.animator.SetTrigger(AnimationHash.Skill); Transform ts = actorProxy.transform; while (targetActorProxy != null && targetActorProxy.baseEntity != null && targetActorProxy.baseEntity.isAlive) { ts.LookAt(targetActorProxy.transform); ts.position += (targetActorProxy.transform.position - ts.position).normalized * (raider.moveSpeed * 5f) * Time.deltaTime; if (Vector3.Distance(targetActorProxy.transform.position, ts.position) < raider.range) { break; } yield return(null); } if (actorProxy.isPlayingAI == false) { yield break; } if (targetActorProxy != null && targetActorProxy.baseEntity != null && targetActorProxy.baseEntity.CanBeTarget()) { targetActorProxy.AddBuff(BuffInfos.Stun, 10f); } }