private static void ApplyCone(Vector2d center, Vector2d rotation, long radius, long angle, Func <LSAgent, bool> conditional, Action <LSAgent> apply, PlatformType targetPlatform) { LSProjectile.Scan(center, radius, conditional); long num = radius * radius; long num2 = angle * angle >> 16; for (int i = 0; i < LSProjectile.outputAgents.Count; i++) { LSAgent lSAgent = LSProjectile.outputAgents [i]; LSProjectile.agentPos = lSAgent.Body.Position; LSProjectile.difference = LSProjectile.agentPos - center; long num3 = LSProjectile.difference.FastMagnitude(); if (num3 <= num && LSProjectile.difference.Dot(rotation.x, rotation.y) > 0L) { num3 >>= 16; long num4 = rotation.Cross(LSProjectile.difference.x, LSProjectile.difference.y); num4 *= num4; num4 >>= 16; if (num4 < num2 * num3 >> 16) { apply(lSAgent); } } } }
// // Static Methods // private static void ApplyArea(Vector2d center, long radius, Func <LSAgent, bool> conditional, Action <LSAgent> apply) { LSProjectile.Scan(center, radius, conditional); long num = radius * radius; for (int i = 0; i < LSProjectile.outputAgents.Count; i++) { LSAgent lSAgent = LSProjectile.outputAgents [i]; if (lSAgent.Body.Position.FastDistance(center.x, center.y) < num) { apply(lSAgent); } } }
// // Static Methods // private void ApplyArea(Vector2d center, long radius, Action <LSAgent> apply) { LSProjectile.Scan(center, radius, this.Source, Source.GetAllegiance(this.Target)); long num = radius * radius; for (int i = 0; i < LSProjectile.outputAgents.Count; i++) { LSAgent lSAgent = LSProjectile.outputAgents [i]; if (lSAgent.Body._position.FastDistance(center.x, center.y) < num) { apply(lSAgent); } } }