public virtual IEnumerator SkillRoutine(CustomCharacterController cc, Vector3 origin) { //Move towards cc.destination = (enemy.transform.position); cc.stopRange = 1; while (true) { if (Vector3.Distance(cc.transform.position, enemy.transform.position) <= cc.stopRange) { DealDamage(enemy, IntensityLevel); OnActivated.Invoke(); break; } yield return(null); } CameraShake camShake = Camera.main.GetComponent <CameraShake>(); camShake.CameraShakeByDefault(); //Move Back cc.destination = (origin); cc.OnDestinationReach.AddListener(SkillEffectEnd); }