Exemple #1
0
        private IEnumerator DummyOkeyHardCode()
        {
            yield return(new WaitForSeconds(1f));

            _dummyOkeyTile = DrawTile();
            _dummyOkeyTile.TurnFaceUp();
            _dummyOkeyTile.TranslateToPosition(GameDeckView.OkeyPosition.position);
        }
Exemple #2
0
        private IEnumerator SmoothDeckReveal(Action p_callback)
        {
            for (int i = 0; i < GameTileDeck.DECK_SIZE; i++)
            {
                yield return(_tileDelay);

                GameTiles[i].TranslateToPosition(GameDeckView.StackPositions[i / 26].position);
            }

            if (p_callback != null)
            {
                p_callback.Invoke();
            }

            _dummyOkeyTile = DrawTile();
            _dummyOkeyTile.TurnFaceUp();
            _dummyOkeyTile.TranslateToPosition(GameDeckView.OkeyPosition.position);
        }
        ///<summary>
        /// GameManager should call this when the time is right
        ///</summary>
        public void DealHand(GameTileArranger p_arranger)
        {
            PlayerBoard.Reset();

            GameTileGroup[] result      = p_arranger.Arrange(PlayerHand);
            GameTileView    currentView = null;

            for (int i = 0; i < result.Length; i++)
            {
                for (int j = 0; j < result[i].GameTileCount; j++)
                {
                    currentView = FindView(result[i][j]);
                    currentView.TranslateToPosition(PlayerBoard.GetNextPosition(), null);
                    currentView.TurnFaceUp();
                }
                PlayerBoard.SkipPosition();
            }
        }