IEnumerator StartGame() { blackScreen.SetActive(true); yield return(null); yield return(null); OrbManager.GetOrbs(); if (!isTutorial) { GenerateNewMap(); } else { StartCoroutine(InstantiateCrowd()); } }
public static void UseE(Obj_AI_Base target) { if (target == null) { return; } foreach (var orb in OrbManager.GetOrbs(true).Where(orb => orb.To2D().IsValid() && ObjectManager.Player.Distance(orb, true) < Math.Pow(E.Range, 2))) { var sp = orb.To2D() + Vector2.Normalize(ObjectManager.Player.ServerPosition.To2D() - orb.To2D()) * 100f; var ep = orb.To2D() + Vector2.Normalize(orb.To2D() - ObjectManager.Player.ServerPosition.To2D()) * 592; Qe.Delay = E.Delay + ObjectManager.Player.Distance(orb) / E.Speed; Qe.UpdateSourcePosition(orb); var pPo = Qe.GetPrediction(target).UnitPosition.To2D(); if (pPo.Distance(sp, ep, true, true) <= Math.Pow(Qe.Width + target.BoundingRadius, 2)) { E.Cast(orb); } } }