Esempio n. 1
0
 public static void Load(Microsoft.Xna.Framework.Content.ContentManager Content)
 {
     background = Content.Load<Texture2D>("Images/background");
     dialogBackground = Content.Load<Texture2D>("Images/dialogBackground");
     playButton = Content.Load<Texture2D>("Images/playButton");
     okButton = Content.Load<Texture2D>("Images/okButton");
     elements[Element.Type.Blue] = Content.Load<Texture2D>("Images/blue");
     elements[Element.Type.Cyan] = Content.Load<Texture2D>("Images/cyan");
     elements[Element.Type.Grey] = Content.Load<Texture2D>("Images/grey");
     elements[Element.Type.Pink] = Content.Load<Texture2D>("Images/pink");
     elements[Element.Type.Red] = Content.Load<Texture2D>("Images/red");
     elements[Element.Type.Yellow] = Content.Load<Texture2D>("Images/yellow");
     font = Content.Load<SpriteFont>("font");
     var spriteSheetLoader = new SpriteSheetLoader(Content);
     glowingBall = spriteSheetLoader.Load("Images/glowingBall");
     explosion = spriteSheetLoader.Load("Images/Explosion");
     bombBonus = spriteSheetLoader.Load("Images/bombBonus");
 }
        /// <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.
            this.spriteBatch = new SpriteBatch(GraphicsDevice);
            this.spriteRender = new SpriteRender(this.spriteBatch);

            var spriteSheetLoader = new SpriteSheetLoader(this.Content);
            this.spriteSheet = spriteSheetLoader.Load("CapGuyDemo.png");
            this.backgroundSprite = this.spriteSheet.Sprite(TexturePackerMonoGameDefinitions.CapGuyDemo.Background);
            this.centreScreen = new Vector2 (this.GraphicsDevice.Viewport.Width / 2, this.GraphicsDevice.Viewport.Height / 2);

            this.InitialiseAnimationManager();
        }