Example #1
0
        public static PlaceOptions Default()
        {
            var opt = new PlaceOptions();

            opt.TileSize = 1;
            opt.Levels   = TileLevel.Defaults();
            return(opt);
        }
Example #2
0
        public void SetExtDic(DicED dicOpt, Document doc)
        {
            SetDataValues(dicOpt?.GetRec("Recs")?.Values, doc);
            var   dicLevels = dicOpt?.GetInner("Levels");
            int   index     = 0;
            RecXD recL;

            do
            {
                recL = dicLevels?.GetRec("Level" + index++);
                if (recL != null)
                {
                    var level = new TileLevel();
                    level.SetDataValues(recL.Values, doc);
                    Levels.Add(level);
                }
            } while (recL != null && index < 4);
            if (Levels == null)
            {
                // Дефолтные уровни
                Levels = TileLevel.Defaults();
            }
        }