Exemplo n.º 1
0
        private void Reset(Maper.Maper maper, Vector2[][] map)
        {
            if (SelectedTile != null)
            {
                SelectedTile.Select(false);
                SelectedTile = null;
            }

            GameTimer = TimeSpan.Zero;

            StartCoroutine(maper.Place(map, _tileSet, () =>
            {
                foreach (var tile in _tileSet)
                {
                    tile.CheckFreedom();
                }

                CalculatePairs();

                _isGame = true;
            }, TilePlaceSpeed));
        }
Exemplo n.º 2
0
        //////////////////////////
        // public methods
        /////////////////////////

        public void NewGame(Maper.Maper maper, Vector2[][] map)
        {
            Reset(maper, map);

            ShowMenu(false);
        }