/// <summary> /// Checks, whether 'our' entity can see the entity given as argument (true) or not (false), caching the result. /// </summary> public virtual bool CanSee(Entity par1Entity) { if (CanSeeCachePositive.Contains(par1Entity)) { return(true); } if (CanSeeCacheNegative.Contains(par1Entity)) { return(false); } Profiler.StartSection("CanSee"); bool flag = EntityObj.CanEntityBeSeen(par1Entity); Profiler.EndSection(); if (flag) { CanSeeCachePositive.Add(par1Entity); } else { CanSeeCacheNegative.Add(par1Entity); } return(flag); }