Exemplo n.º 1
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
     camera           = new Camera2D(GraphicsDevice.Viewport);
     map              = new Map();
     SecretLvl        = new Map();
     map_Lvl2         = new Map();
     aTimer           = new Timer();
     bTimer           = new Timer();
     cTimer           = new Timer();
     aTimer.Interval  = 1000;
     bTimer.Interval  = 1500;
     cTimer.Interval  = 1300;
     aTimer.Elapsed  += OnTimeEvent;
     bTimer.Elapsed  += OnTimeEvent2;
     cTimer.Elapsed  += OnTimeEvent3;
     aTimer.AutoReset = true;
     aTimer.Enabled   = true;
     bTimer.AutoReset = true;
     bTimer.Enabled   = true;
     cTimer.AutoReset = true;
     cTimer.Enabled   = true;
     base.Initialize();
 }