/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here ballSimulation = new BallSimulation(); base.Initialize(); }
public BallView(BallSimulation simulation, Camera Camera, GraphicsDevice graphics, ContentManager content) { this.ballSimulation = simulation; this.camera = Camera; this.boom = content.Load<Texture2D>("explosion"); this.shockWave = content.Load<Texture2D>("shield"); this.smokeTexture = content.Load<Texture2D>("particlesmoke"); this.ballTexture = content.Load<Texture2D>("ball"); this.explosionEffect = content.Load<SoundEffect>("Explosion+4"); this.playerScope = content.Load<Texture2D>("circle"); box = new Texture2D(graphics, 1, 1); box.SetData(new[] { Color.White }); }