Skip to content

Instantly share code, notes, and snippets.

@todorok1 todorok1/RandomTest_02.cs
Last active Jun 18, 2018

Embed
What would you like to do?
ランダムな値を取得して遊ぶ
void RollADice(){
// 乱数の範囲指定で配列のインデックスを取得する
int index = Random.Range(0, dice.Length);
// サイコロの目を取得する
int pips = dice[index];
Debug.Log("サイコロの目は " + pips + " でした。");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.