public static Banner CreateOneColoredEmptyBanner(int colorIndex) { Banner banner = new Banner(); banner.AddIconData(new BannerData(BannerManager.Instance.GetRandomBackgroundId(new Random()), colorIndex, colorIndex, new Vec2(1536f, 1536f), new Vec2(768f, 768f), false, false, 0.0f)); return(banner); }
public static Banner CreateOneColoredBannerWithOneIcon( uint backgroundColor, uint iconColor, int iconMeshId) { Banner coloredEmptyBanner = Banner.CreateOneColoredEmptyBanner(BannerManager.GetColorId(backgroundColor)); if (iconMeshId == -1) { iconMeshId = BannerManager.Instance.GetRandomBannerIconId(MBRandom.Random); } coloredEmptyBanner.AddIconData(new BannerData(iconMeshId, BannerManager.GetColorId(iconColor), BannerManager.GetColorId(iconColor), new Vec2(512f, 512f), new Vec2(768f, 768f), false, false, 0.0f)); return(coloredEmptyBanner); }
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); }