public void MoveToken() { if (mYellowCanMove && GameManagerScript.mGameManager.mDiceRolled == true) { mYellowToken.CircleDisable(); mPlayerOutIndex = 0; mMoveToken = StartCoroutine(IMoveToken()); GameManagerScript.mGameManager.mDiceRolled = false; } }
IEnumerator IMoveToNextPlayer() { yield return(new WaitForSeconds(.75f)); mRedToken.CircleDisable(); mBlueToken.CircleDisable(); mYellowToken.CircleDisable(); mGreenToken.CircleDisable(); if (mLastToken == true) { mPlayerIndex = 0; StartGame(mPlayingTokens[mPlayerIndex]); } else { MoveToNextPlayer(); } }