public void RadarDrawer(Vector3 botPos, Dictionary <string, EnemyProp> List) { foreach (var poin in List) { var point = poin.Value; if (point != null) { Vector2 RelPos2D = point.GetRadar2dLocation(botPos) * radarScale + radarOffset; float dir2d = point.GetRadar2dAngle(); Util.PolyMaker2D(ap, Color.red, 3 + radarScale * 5, 8, dir2d, RelPos2D); Util.PolyMaker2D(ap, Color.green, 4 + radarScale * 5, 2, dir2d, RelPos2D + new Vector2(point.GetForward2D().x + 4 * Util.Angle("sin", dir2d), point.GetForward2D().z + 4 * Util.Angle("cos", dir2d))); } } }
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")); }