Пример #1
0
        public void ClearAllIcons()
        {
            BannerData bannerData = this._bannerDataList[0];

            this._bannerDataList.Clear();
            this._bannerDataList.Add(bannerData);
        }
Пример #2
0
 public void AddIconData(BannerData iconData)
 {
     if (this._bannerDataList.Count >= 33)
     {
         return;
     }
     this._bannerDataList.Add(iconData);
 }
Пример #3
0
        private static Banner CreateRandomBannerInternal(
            int seed = -1,
            Banner.BannerIconOrientation orientation = Banner.BannerIconOrientation.None)
        {
            Game       current  = Game.Current;
            Random     random   = seed == -1 ? MBRandom.Random : new Random(seed);
            Banner     banner   = new Banner();
            BannerData iconData = new BannerData(BannerManager.Instance.GetRandomBackgroundId(random), random.Next(BannerManager.ColorPalette.Count), random.Next(BannerManager.ColorPalette.Count), new Vec2(1536f, 1536f), new Vec2(768f, 768f), false, false, 0.0f);

            banner.AddIconData(iconData);
            switch (orientation == Banner.BannerIconOrientation.None ? random.Next(6) : (int)orientation)
            {
            case 0:
                banner.CentralPositionedOneIcon(random);
                break;

            case 1:
                banner.CenteredTwoMirroredIcons(random);
                break;

            case 2:
                banner.DiagonalIcons(random);
                break;

            case 3:
                banner.HorizontalIcons(random);
                break;

            case 4:
                banner.VerticalIcons(random);
                break;

            case 5:
                banner.SquarePositionedFourIcons(random);
                break;
            }
            return(banner);
        }
Пример #4
0
 public BannerData(BannerData bannerData)
     : this(bannerData.MeshId, bannerData.ColorId, bannerData.ColorId2, bannerData.Size, bannerData.Position, bannerData.DrawStroke, bannerData.Mirror, bannerData.RotationValue)
 {
 }