public void LockOnSystem(AutoPilot ap) { RadarLocked = true; Util.PolyMaker2D(Color.white, dScrn + 3, 4, 45, new Vector2(0, 0)); foreach (var enemy in enemyBot) { if (enemy.Value.gameObject != null) { Vector3 screenPos = Util.CoordFromCam(enemy.Value.gameObject.transform.position); Vector2 ScrPosCon = Util.ScreenConvert(screenPos); if (screenPos.z >= 0 && !enemy.Value.lockState) { Util.PolyMaker2D(Color.blue, 4, 4, 90 * Time.time / 1.15f, ScrPosCon); } if (enemy.Value.lockState) { Scan.LockOnHUD(botPos, enemy.Value); if (Menu.GetValueBool("lockOnStat")) { Scan.LockSet(enemy.Value); } } } } if (Menu.GetValueBool("lockOnStat")) { Scan.LockSet(0); } foreach (var enemy in plasmaPoint) { if (enemy.Value.gameObject != null) { Vector3 screenPos = Util.CoordFromCam(enemy.Value.gameObject.transform.position); Vector2 ScrPosCon = Util.ScreenConvert(screenPos); if (screenPos.z >= 0) { Util.PolyMaker2D(Color.red, 4, 4, 90 * Time.time / 1.15f, ScrPosCon); } } } if (lockedEnemy != null) { if (lockedEnemy.gameObject == null) { lockedEnemy = nullEnemy; } } lockedEnemy = Scan.LockOn(enemyBot, lockedEnemy); Lock.input(); if (lockedEnemy != null) { Rad.RadarUnique(ap, botPos, lockedEnemy); Lock.LockOn(botPos, botVel, lockedEnemy.gameObject); Scan.LockOnHUD(botPos, lockedEnemy); } if (Key.PressedDown("Reset LockOn", 1)) { Scan.ResetLock(); } Lock.LockOnUpdate(Menu.GetValueBool("lockOnStat")); }