Esempio n. 1
0
 public void Initialize(int size, int depth, int sectorSize)
 {
     Locator.Provide(StateMachine);
     TileMap = new TileMap(size, depth, sectorSize);
     Locator.Provide(TileMap);
     View = new TileMapView(TileMap, Locator.Get <TextureManager>(), 1.0f);
     Locator.Provide(View);
     StateMachine.SetState(new IdleState());
     _driver = Locator.Get <GridiaDriver>();
 }
Esempio n. 2
0
        public MainController(GameStateModel gs, ref TileMapView tm)
        {
            // Model
            _gameStateModel = gs;
            _gameHistory    = new Stack <List <List <Stack <string> > > >();
            _gameHistory.Push(_gameStateModel.GetState());

            // Internal Controllers
            ResetRules();
            RecalculateRule();

            // Views
            _tileMapView       = tm;
            _gridMain          = _tileMapView.GetWindow().gridMain;
            _gridMain.KeyDown += new KeyEventHandler(HandleKeyboardInput);
        }