MapServer.GameMap.IsSafeArea C# (CSharp) Метод

IsSafeArea() публичный Метод

public IsSafeArea ( short x, short y ) : bool
x short
y short
Результат bool
        public bool IsSafeArea(short x,short y)
        {
            if(mListRegionInfo == null)return false;
            for(int i = 0;i < mListRegionInfo.Count;i++)
            {
                if(mListRegionInfo[i].type == GameStruct.MapRegionInfo.MAPREGIONINFO_TYPE_SAFE)
                {
                        int dis_x = Math.Abs(x- mListRegionInfo[i].bound_x);
                        int dis_y = Math.Abs(y - mListRegionInfo[i].bound_y);
                        if (dis_x <= mListRegionInfo[i].bound_cx &&
                            dis_y <= mListRegionInfo[i].bound_cy)
                        {
                            return true;
                        }

                }
            }
            return false;
        }