예제 #1
0
        public CharacterSelectState(GraphicsDevice graphics) : base(graphics)
        {
            Point menuSize = new Point(graphics.PresentationParameters.Bounds.Width / 2, graphics.PresentationParameters.Bounds.Height / 2);

            for (int i = 0; i < 4; i++)
            {
                Rectangle bounds = new Rectangle
                                   (
                    (i % 2) * menuSize.X,
                    (i / 2) * menuSize.Y,
                    menuSize.X,
                    menuSize.Y
                                   );
                menus[i] = new CharacterSelectMenu(i, bounds);
            }

            controllers   = PlayerManager.GetConnectedControllers();
            playerManager = new PlayerManager();
            playerManager.PlayerConnected += PlayerConnected;

            TileMap map = new TileMap(40, 24);

            gameState = new GameState(graphics, map, new List <Player>());
        }
 private void Awake()
 {
     i = this;
 }
예제 #3
0
 void Awake()
 {
     characterSelectMenu = GetComponentInParent <CharacterSelectMenu>();
 }
예제 #4
0
 // [Menu]
 public void Initialize(CharacterSelectMenu owner)
 {
     _owner = owner;
 }