Exemplo n.º 1
0
 public static MenuObject Instance(int w, int h, ContentManager Content)
 {
     lock (padlock) {
         if (instance == null) {
             instance = new MenuObject(w, h, Content);
         }
         return instance;
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            gameObject = GameObject.Instance(graphics.GraphicsDevice.Viewport.Width, graphics.GraphicsDevice.Viewport.Height, Content, GraphicsDevice);
            menuObject = MenuObject.Instance(graphics.GraphicsDevice.Viewport.Width, graphics.GraphicsDevice.Viewport.Height, Content);

            networkObject = NetworkObject.Instance();

            menuObject.active = true;

            currentState = menuObject;

            // TODO: use this.Content to load your game content here

            MediaPlayer.Play((Content.Load<Song>("Sound/Stratospheres")));
            MediaPlayer.IsRepeating = true;
        }