Last active
June 18, 2018 11:50
-
-
Save todorok1/2c1cb469997b44487a2d4460e9737e7e to your computer and use it in GitHub Desktop.
ランダムな値を取得して遊ぶ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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