Exemple #1
0
    /// <summary>
    /// 保存画布方案
    /// </summary>
    public void SaveCanvansInfo()
    {
        List <ShipPutInfo> l            = GetShipBuildInfo(ShipBuildType.BuildStair);
        List <Int2>        lCutMapPoint = new List <Int2> ();

        foreach (ShipPutInfo I in l)
        {
            //裁剪掉上层
            lCutMapPoint.Add(new Int2(I.cxMapGrid / MapGrid.m_UnitRoomGridNum, I.cyMapGrid + 1));
        }
        m_Canvans.SetStairMap(lCutMapPoint, m_xymode);
    }
Exemple #2
0
    /// <summary>
    /// 创建船体骨架
    /// </summary>
    private static ShipCanvasInfo GetShipBodyMap()
    {
        List <StairInfo> lStair = new List <StairInfo>();

        CmCarbon.GetStairInfo(ref lStair);

        ShipCanvasInfo Info = new ShipCanvasInfo();

        Info.Copy(CmCarbon.GetDefenseMap());

        List <Int2> lCutMapPoint = new List <Int2> ();

        foreach (StairInfo I in lStair)
        {
            //裁剪掉上层
            lCutMapPoint.Add(new Int2(I.Up.Unit / MapGrid.m_UnitRoomGridNum, I.Up.Layer));
        }
        Info.SetStairMap(lCutMapPoint, XYmode.Save2Edit);
        return(Info);
    }