Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created June 25, 2018 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todorok1/f9934150a895baaa663fe3d8cdeca925 to your computer and use it in GitHub Desktop.
Save todorok1/f9934150a895baaa663fe3d8cdeca925 to your computer and use it in GitHub Desktop.
カードをランダムにシャッフルするサンプル
void ShuffleCards(){
// カードをシャッフルする
for (int i = 0; i < cardList.Count; i++){
Card temp = cardList[i];
int randomIndex = Random.Range(0, cardList.Count);
cardList[i] = cardList[randomIndex];
cardList[randomIndex] = temp;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment