Exemple #1
0
 private void ProcessAreaLua(GameMap gameMap, Point p)
 {
     if (gameMap != null)
     {
         Point      GridPoint      = new Point(p.X, p.Y);
         List <int> areaLuaIDList  = gameMap.GetAreaLuaIDListByPoint(GridPoint);
         List <int> enteLuaIDList  = new List <int>();
         List <int> leaveLuaIDList = new List <int>();
         if (areaLuaIDList != null)
         {
             if (this._OldAreaLuaIDList != null)
             {
                 foreach (int luaID in areaLuaIDList)
                 {
                     if (!this._OldAreaLuaIDList.Contains(luaID))
                     {
                         enteLuaIDList.Add(luaID);
                     }
                 }
             }
             else
             {
                 enteLuaIDList = areaLuaIDList;
             }
         }
         if (this._OldAreaLuaIDList != null)
         {
             if (areaLuaIDList != null)
             {
                 foreach (int luaID in this._OldAreaLuaIDList)
                 {
                     if (!areaLuaIDList.Contains(luaID))
                     {
                         leaveLuaIDList.Add(luaID);
                     }
                 }
             }
             else
             {
                 leaveLuaIDList = this._OldAreaLuaIDList;
             }
         }
         if (leaveLuaIDList != null && leaveLuaIDList.Count > 0)
         {
         }
         if (enteLuaIDList != null && enteLuaIDList.Count > 0)
         {
             this.RunAreaLuaFile(gameMap, RunAreaLuaType.AreaLuaIDList, enteLuaIDList, "enterArea", 0);
         }
         this._OldAreaLuaIDList = areaLuaIDList;
     }
 }