示例#1
0
        /// <summary>
        /// Setup initial game values (such as setting the back buffer, etc...)
        /// </summary>
        /// <param name="graphics"></param>
        public static void Initialize(GraphicsDeviceManager graphics, UpdateEvent updates)
        {
            graphics.PreferredBackBufferWidth = (int)WorldWidth;
            graphics.PreferredBackBufferHeight = (int)WorldHeight;
            graphics.ApplyChanges();
            TitleSafeArea = graphics.GraphicsDevice.Viewport.TitleSafeArea;
            Controllers = new List<Controller>();
            Controllers.Add(new Controller(PlayerIndex.One, updates));
            Controllers.Add(new Controller(PlayerIndex.Two, updates));
            Controllers.Add(new Controller(PlayerIndex.Three, updates));
            Controllers.Add(new Controller(PlayerIndex.Four, updates));

            #if DEBUG
            PrimaryController = Controllers[1];
            #else
            PrimaryController = Controllers[0];
            #endif
        }
示例#2
0
 public MultiController(Controller controller)
 {
     m_controllers = new List<Controller>();
     m_controllers.Add(controller);
 }