Пример #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()
        {
            Serv.Initialize(m_GraphicsDM, this);

            // The number determines how good our anti-aliasing works.
            // Possible values are 2,4,8,16,32, but not all work on all computers.
            // 4 is safe, and 8 is too in almost all cases
            // Higher numbers mean lower frame-rates

            base.Initialize();
        }
Пример #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()
 {
     Serv.Initialize(m_GraphicsDM, this);
     base.Initialize();
     m_Player.BackgroundReference(m_Background);
     m_Enemy.BackgroundReference(m_Background);
     m_Enemy.PlayerReference(m_Player);
     Serv.AddUpdateableComponent(m_Background);
     Components.Add(m_Enemy);
     Serv.AddBeginable(m_Background);
     Serv.AddBeginable(m_Enemy);
 }