예제 #1
0
			public HowToPlaySubMenu(MainMenu parent, Theme backTheme)
			{
				this.parent = parent;
				this.backTheme = backTheme;
				Add(new Sprite(new Material(ShaderFlags.Position2DColoredTextured, "BreakoutLogo"),
					Rectangle.FromCenter(0.5f, ScreenSpace.Current.Viewport.Top + 0.2f, 0.7f, 0.3f)));
				SetViewportBackground("Background");
				AddControlDescription();
				AddBackButton();
			}
예제 #2
0
파일: Game.cs 프로젝트: whztt07/DeltaEngine
		public Game(Window window)
		{
			screenSpace = new Camera2DScreenSpace(window);
			this.window = window;
			menu = new MainMenu();
			menu.InitGame += InitGame;
			menu.QuitGame += window.CloseAfterFrame;
			window.ViewportPixelSize = Settings.Current.Resolution;
			soundTrack = ContentLoader.Load<Music>("BreakoutMusic");
			soundTrack.Loop = true;
			soundTrack.Play();
			MainMenu.SettingsChanged += UpdateMusicVolume;
			screenSpace.Zoom = 1 / window.ViewportPixelSize.AspectRatio;
			window.ViewportSizeChanged += SizeChanged;
			SetViewportBackground("Background");
		}
예제 #3
0
			public OptionSubmenu(MainMenu parent, Theme menuTheme)
			{
				this.parent = parent;
				this.menuTheme = menuTheme;
				SetViewportBackground("Background");
				Add(new Sprite(new Material(ShaderFlags.Position2DColoredTextured, "BreakoutLogo"),
					Rectangle.FromCenter(0.5f, ScreenSpace.Current.Viewport.Top + 0.2f, 0.7f, 0.3f)));
				AddMusicOption();
				AddSoundOption();
				AddBackButton();
			}