Esempio n. 1
0
        public override void Initialize()
        {
            this.game = new WaveFrogger.Game();
            this.game.Initialize(this);

            #region DEFAULT SPLASHSCREEN
            this.backgroundSplashColor = new Color("#ebebeb");
            this.spriteBatch = new SpriteBatch(WaveServices.GraphicsDevice);

            var resourceNames = Assembly.GetExecutingAssembly().GetManifestResourceNames();
            string name = string.Empty;

            foreach (string item in resourceNames)
            {
                if (item.Contains("SplashScreen.wpk"))
                {
                    name = item;
                    break;
                }
            }

            if (string.IsNullOrWhiteSpace(name))
            {
                throw new InvalidProgramException("License terms not agreed.");
            }

            using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name))
            {
                this.splashScreen = WaveServices.Assets.Global.LoadAsset<Texture2D>(name, stream);
            }
            #endregion
        }
Esempio n. 2
0
        public override void Initialize()
        {
            this.game = new WaveFrogger.Game();
            this.game.Initialize(this);

            #region DEFAULT SPLASHSCREEN
            this.backgroundSplashColor = Color.White;
            this.spriteBatch           = new SpriteBatch(WaveServices.GraphicsDevice);

            var    resourceNames = Assembly.GetExecutingAssembly().GetManifestResourceNames();
            string name          = string.Empty;

            foreach (string item in resourceNames)
            {
                if (item.Contains("SplashScreen.png"))
                {
                    name = item;
                    break;
                }
            }

            if (string.IsNullOrWhiteSpace(name))
            {
                throw new InvalidProgramException("License terms not agreed.");
            }

            using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name))
            {
                this.splashScreen = Texture2D.FromFile(WaveServices.GraphicsDevice, stream);
            }
            #endregion
        }
Esempio n. 3
0
        public override void Initialize()
        {
            game = new WaveFrogger.Game();
            game.Initialize(this);

            this.Window.AddFlags(WindowManagerFlags.KeepScreenOn);
        }
Esempio n. 4
0
        public override void Initialize()
        {
            game = new WaveFrogger.Game();
            game.Initialize(this);

            this.Window.AddFlags(WindowManagerFlags.KeepScreenOn);
        }
Esempio n. 5
0
        public override void Initialize()
        {
            this.game = new WaveFrogger.Game();
            this.game.Initialize(this);

            #region WAVE SOFTWARE LICENSE AGREEMENT
            this.backgroundSplashColor = new Color("#ebebeb");
            this.spriteBatch           = new SpriteBatch(WaveServices.GraphicsDevice);

            var    resourceNames = Assembly.GetExecutingAssembly().GetManifestResourceNames();
            string name          = string.Empty;

            foreach (string item in resourceNames)
            {
                if (item.Contains("SplashScreen.wpk"))
                {
                    name = item;
                    break;
                }
            }

            if (string.IsNullOrWhiteSpace(name))
            {
                throw new InvalidProgramException("License terms not agreed.");
            }

            using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name)) {
                this.splashScreen = WaveServices.Assets.Global.LoadAsset <Texture2D> (name, stream);
            }
            #endregion
        }