示例#1
0
        public TowerDefence()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            AppState    = AppState.NotRunning;
            _serviceBus = new ServiceBus();
            _serviceBus.AddMessage("Towerdefence is " + AppState.ToString());
        }
示例#2
0
        protected override void Initialize()
        {
            AppState = AppState.Running;
            Random   = new Random();

            graphics.PreferredBackBufferWidth  = ScreenWidth;
            graphics.PreferredBackBufferHeight = ScreenHeight;
            graphics.ApplyChanges();

            IsMouseVisible = true;

            GameKey = Guid.NewGuid().ToString();
            _sessionStorageProvider = new SessionStorageProvider();
            _sessionStorageProvider.CreateNewSession(GameKey);
            _serviceBus.AddMessage("Towerdefence is " + AppState.ToString());

            base.Initialize();
        }