Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int r = 1; r < 40; r += (int)playerRadius)// (int)(crystalRadius / (2 * System.Math.PI)))
- {
- float sampleAngle = 10;
- for (int i = 0; i < sampleAngle; i++)
- {
- float angle = i / sampleAngle * 2.0f * (float)System.Math.PI;
- angle = angle + ((2 * (float)System.Math.PI) / sampleAngle) * (float)rand.NextDouble();
- float px = ObjectManager.Me.Position.X + r * (float)System.Math.Cos(angle);
- float py = ObjectManager.Me.Position.Y + r * (float)System.Math.Sin(angle);
- float objColliding = 0;
- foreach (WoWGameObject obj in objList)
- {
- float distance = Vector3.Distance2D(new Vector3(px, py, ObjectManager.Me.Position.Z), new Vector3(obj.Position.X, obj.Position.Y, ObjectManager.Me.Position.Z));
- //Logging.Write("2D: " +distance + " 3D: " + Vector3.Distance(new Vector3(px, py, ObjectManager.Me.Position.Z), new Vector3(obj.Position.X, obj.Position.Y, ObjectManager.Me.Position.Z)));
- if (distance <= (aoeRadius + playerRadius))// * (aoeRadius + playerRadius))
- {
- Radar3D.OnDrawEvent += () =>
- {
- Radar3D.DrawCircle(new Vector3(px, py, ObjectManager.Me.Position.Z), 1, Color.Red, false, 100);
- };
- objColliding++;
- }
- else
- {
- Radar3D.OnDrawEvent += () =>
- {
- Radar3D.DrawCircle(new Vector3(px, py, ObjectManager.Me.Position.Z), 1, Color.Green, false, 100);
- };
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement