GetMapGridInfo() public method

public GetMapGridInfo ( ) : GameStruct.MapGridInfo[
return GameStruct.MapGridInfo[
コード例 #1
0
ファイル: GameMap.cs プロジェクト: tangfengray/soul
        //复制地图对象- 用于做副本使用
        public GameMap Clone()
        {
            GameMap new_map = new GameMap(this.info);

            new_map.mnWidth  = this.mnWidth;
            new_map.mnHeight = this.mnHeight;
            new_map.mPath    = new MapPath(mnHeight, mnWidth);

            for (uint i = 0; i < mnHeight; i++)
            {
                for (uint j = 0; j < mnWidth; j++)
                {
                    new_map.GetMapGridInfo()[j, i] = this.mMapGridInfo[j, i];
                    if (new_map.GetMapGridInfo()[j, i].Mask > 0)
                    {
                        new_map.mPath.SetPointMask((short)j, (short)i, MapPath.MASK_CLOSE);
                    }
                }
            }
            foreach (BaseObject obj in this.GetAllObject().Values)
            {
                new_map.AddObject(obj, obj.GetGameSession());
            }
            return(new_map);
        }
コード例 #2
0
ファイル: GameMap.cs プロジェクト: dream-young-soul/soul
        //复制地图对象- 用于做副本使用
        public GameMap Clone()
        {
            GameMap new_map = new GameMap(this.info);
            new_map.mnWidth = this.mnWidth;
            new_map.mnHeight = this.mnHeight;
            new_map.mPath = new MapPath(mnHeight, mnWidth);

            for (uint i = 0; i < mnHeight; i++)
            {
                for (uint j = 0; j < mnWidth; j++)
                {
                    new_map.GetMapGridInfo()[j, i] = this.mMapGridInfo[j, i];
                    if (new_map.GetMapGridInfo()[j, i].Mask > 0)
                    {
                        new_map.mPath.SetPointMask((short)j, (short)i, MapPath.MASK_CLOSE);
                    }
                }
            }
            foreach (BaseObject obj in this.GetAllObject().Values)
            {
                new_map.AddObject(obj, obj.GetGameSession());
            }
            return new_map;
        }