public AIStatic(string id, AIStaticType type) : base() { _identifier = id; _type = type; _radius = 60; _aiobjects = new List <AIObject>(); _aiobjects_prev = new AIObject[100]; IsSmallText = true; }
public AIStatic(string id, AIStaticType type) : base() { _identifier = id; _type = type; _radius = 60; _aiobjects = new List<AIObject>(); _aiobjects_prev = new AIObject[100]; IsSmallText = true; }
private AIStatic GetNearestAvailableStatic(AIStaticType type) { AIStatic nearest = null; float min_dist = float.MaxValue; foreach (AIStatic aistatic in AIGame.AIContainer.AIStatics.FindAll(delegate(AIStatic ais) { return(ais.Type == type); })) { float real_dist = (aistatic.Position - Position).Length(); if (real_dist < min_dist) { nearest = aistatic; min_dist = real_dist; } } return(nearest); }
public AIStatic GetNearestStatic(Vector3 position, AIStaticType type) { AIStatic nearest = null; float min_dist = float.MaxValue; foreach (AIStatic aistatic in _aistatics) { if (aistatic.Type == type) { float real_dist = (aistatic.Position - position).Length(); if (real_dist < min_dist) { nearest = aistatic; min_dist = real_dist; } } } return(nearest); }
public AIStatic GetOtherNearestStatic(Vector3 position, AIStaticType type, List <AIStatic> not_this_ones) { AIStatic nearest = null; float min_dist = float.MaxValue; foreach (AIStatic aistatic in _aistatics) { if (not_this_ones.Contains(aistatic)) { continue; } if (aistatic.Type == type) { float real_dist = (aistatic.Position - position).Length(); if (real_dist < min_dist) { nearest = aistatic; min_dist = real_dist; } } } return(nearest); }
public AIStatic GetOtherNearestStatic(Vector3 position, AIStaticType type, List<AIStatic> not_this_ones) { AIStatic nearest = null; float min_dist = float.MaxValue; foreach (AIStatic aistatic in _aistatics) { if (not_this_ones.Contains(aistatic)) continue; if (aistatic.Type == type) { float real_dist = (aistatic.Position - position).Length(); if (real_dist < min_dist) { nearest = aistatic; min_dist = real_dist; } } } return nearest; }
public AIStatic GetNearestStatic(Vector3 position, AIStaticType type) { AIStatic nearest = null; float min_dist = float.MaxValue; foreach (AIStatic aistatic in _aistatics) { if (aistatic.Type == type) { float real_dist = (aistatic.Position - position).Length(); if (real_dist < min_dist) { nearest = aistatic; min_dist = real_dist; } } } return nearest; }
public void AddAIStatic(string id, AIStaticType type) { _aistatics.Add(new AIStatic(id, type)); }
private AIStatic GetNearestAvailableStatic(AIStaticType type) { AIStatic nearest = null; float min_dist = float.MaxValue; foreach (AIStatic aistatic in AIGame.AIContainer.AIStatics.FindAll(delegate(AIStatic ais) { return ais.Type == type;})) { float real_dist = (aistatic.Position - Position).Length(); if (real_dist < min_dist) { nearest = aistatic; min_dist = real_dist; } } return nearest; }