示例#1
0
        public Tiro atirar(GerenciadorTiro gt)
        {
            Tiro t = gt.getTiro();

            if (t != null)
            {
                t.pos    = this.pos;
                t.pos.X += 10;
                t.pos.Y += 5;
                t.Disparar();
            }
            return(t);
        }
示例#2
0
 /// <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
     aviao          = new Aviao();
     tiro           = null;
     obstaculo      = null;
     tiroPreparado  = false;
     tempoTiro      = 0;
     gt             = new GerenciadorTiro();
     go             = new GerenciadorObstaculo();
     rnd            = new Random();
     IsMouseVisible = true;
     posbutton      = new Rectangle(250, 400, 300, 100);
     posButton2     = new Rectangle(250, 200, 300, 100);
     posButton3     = new Rectangle(250, 300, 300, 100);
     base.Initialize();
 }