Ejemplo n.º 1
0
 public GameController(Texture2D spark, Texture2D smoke, Texture2D explosion, Rectangle gameWindow, Vector2 startPosition)
 {
     this.spark = spark;
     this.smoke = smoke;
     this.explosion = explosion;
     this.gameWindow = gameWindow;
     this.startPosition = startPosition;
     sparkSystem = new SparkSystem(startPosition);
     smokeSystem = new SmokeSystem(startPosition);
     explosionSystem = new ExplosionSystem(startPosition);
 }
Ejemplo n.º 2
0
 public GameController(Texture2D spark, Texture2D smoke, Texture2D explosion, Rectangle gameWindow,
     Vector2 startPosition, SpriteBatch spriteBatch, Camera camera, SoundEffect explosionSound)
 {
     this.spark = spark;
     this.smoke = smoke;
     this.explosion = explosion;
     this.gameWindow = gameWindow;
     this.startPosition = startPosition;
     this.spriteBatch = spriteBatch;
     this.camera = camera;
     this.explosionSound = explosionSound;
     sparkSystem = new SparkSystem(startPosition);
     smokeSystem = new SmokeSystem(startPosition);
     explosionSystem = new ExplosionSystem(startPosition, explosionSound);
 }
Ejemplo n.º 3
0
 public void Initiate()
 {
     sparkSystem = new SparkSystem(startPosition);
     smokeSystem = new SmokeSystem(startPosition);
     explosionSystem = new ExplosionSystem(startPosition);
 }
Ejemplo n.º 4
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);
            spark = Content.Load<Texture2D>("spark");
            smoke = Content.Load<Texture2D>("particlesmoke");
            explosion = Content.Load<Texture2D>("explosion");
            fireSound = Content.Load<SoundEffect>("firesound.wav");
            camera = new Camera(graphics.GraphicsDevice.Viewport);
            Vector2 startPosition = new Vector2(0.5f, 0.5f);
            gameWindow = camera.GetGameWindow();
            gameView = new GameController(spark, smoke, explosion, gameWindow, startPosition, spriteBatch, camera, fireSound);
            smokeSystem = new SmokeSystem();

            // TODO: use this.Content to load your game content here
        }
Ejemplo n.º 5
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);
            spark = Content.Load<Texture2D>("spark");
            smoke = Content.Load<Texture2D>("particlesmoke");
            explosion = Content.Load<Texture2D>("explosion");
            //Vector2 startPosition = new Vector2(graphics.GraphicsDevice.Viewport.Bounds.Width / 2.0f, graphics.GraphicsDevice.Viewport.Bounds.Height / 2.0f);
            camera = new Camera(graphics.GraphicsDevice.Viewport);
            Vector2 startPosition = new Vector2(0.5f, 0.5f);
            gameWindow = camera.GetGameWindow();
            gameView = new GameController(spark, smoke, explosion, gameWindow, startPosition);
             ss = new SmokeSystem();
             gameView.Initiate();

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