Пример #1
0
 public Balle(Raquette r, Game game, String texture, MurDeBriques mu) : base(game, texture, new Vector2(0, 0))
 {
     raquette     = r;
     murDeBriques = mu;
     vitesseX     = 3;
     vitesseY     = 3;
 }
Пример #2
0
        protected override void Initialize()
        {
            Raquette     raquette;
            Hud          hud;
            MurDeBriques mu;

            hud = new Hud(this, "score", new Vector2(10, 10));
            this.Components.Add(hud);

            raquette = new Raquette(this, "Textures/whiteSquare");
            this.Components.Add(raquette);

            mu = new MurDeBriques(this);
            this.Components.Add(mu);

            Balle balle1 = new Balle(raquette, this, "Textures/ball", mu);

            balles.Add(balle1);
            this.Components.Add(balle1);

            base.Initialize();
            this._graphics.IsFullScreen              = false;
            this._graphics.PreferredBackBufferWidth  = 800;
            this._graphics.PreferredBackBufferHeight = 600;
            this._graphics.ApplyChanges();
        }