示例#1
0
 public void InitializeBoard(AngleGame gameCore)
 {
     _game             = gameCore;
     _rule             = _game.Moving;
     _figureCollection = new FigureCollection(Width, Height);
     _fadedPanel       = _fadeBoardTransform.GetComponent <FadedPanel>();
     _fadedPanel.NewPositionSelected       += OnFadedPanelNewPositionSelectedHandler;
     _fadedPanel.OneOfNewPositionsSelected += OnFadedPanelOneOfNewPositionsSelectedHandler;
     _fadedPanel.Cancelled          += OnFadedPanelCancelledHandler;
     _fadedPanel.MultiJumpCancelled += OnFadedPanelMultiJumpCancelledHandler;
 }
示例#2
0
 private void InitializeFields()
 {
     _players     = new List <Player>();
     _playerAreas = new List <PlayerArea>();
     _random      = new Random();
     _gameFormat  = (int)_gameOptions.Format;
     _movingType  = (MovingRuleType)PlayerPrefs.GetInt("GAME_TYPE");
     _movingRule  = SetMovingRuleForGame(_movingType);
     _gameBoard.InitializeBoard(this);
     _gameBoard.FigureMoved  += OnGameBoardFigureMoved;
     _gameBoard.FigureMoving += OnGameBoardFigureMoving;
 }