Ejemplo n.º 1
0
        public static void Main()
        {
            using (Game1 game = new Game1())
            {
                game.IsMouseVisible = false;

                game.Run();
            }
        }
Ejemplo n.º 2
0
        public static void ResetAppModel()
        {
            IEventAggregator oldAggregator = _eventAggregator;
            _eventAggregator = null;
            _slimCore = null;

            if (_network != null)
            {
                _network.Dispose();
            }

            _network = null;
            if (_game != null)
                _game.Dispose();
            _game = null;
            _AI = null;

            //Create new instances of these things by accessing them
            EventAggregator.GetHashCode();
            SlimCore.GetHashCode();
            XNAGame.GetHashCode();
            AI.GetHashCode();

            oldAggregator.Publish(new ResetMessage() { EventAggregator = _eventAggregator, });
        }