示例#1
0
文件: App.cs 项目: sgrizan/Samples
        public override void Initialize()
        {
            game = new SocialSampleProject.Game();
            game.Initialize(this);

            this.Window.AddFlags(WindowManagerFlags.KeepScreenOn);
        }
示例#2
0
文件: App.cs 项目: sgrizan/Samples
        public override void Initialize()
        {
            this.game = new SocialSampleProject.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);
            }

            position = new Vector2();
            #endregion
        }
示例#3
0
文件: App.cs 项目: sgrizan/Samples
        public override void Initialize()
        {
            this.game = new SocialSampleProject.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);
            }

            position = new Vector2();
            #endregion
        }
示例#4
0
文件: App.cs 项目: sgrizan/Samples
        public override void Initialize()
        {
            game = new SocialSampleProject.Game();
            game.Initialize(this);

            this.Window.AddFlags(WindowManagerFlags.KeepScreenOn);
        }
示例#5
0
 public override void Initialize()
 {
     game = new SocialSampleProject.Game();
     game.Initialize(this);
 }
示例#6
0
 public override void Initialize()
 {
     game = new SocialSampleProject.Game();
     game.Initialize(this);
 }