public void MoveToken() { if (mRedCanMove && GameManagerScript.mGameManager.mDiceRolled == true) { mRedToken.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(); } }