Guest User

Untitled

a guest
Jun 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. void RollADice(){
  2. // 乱数の範囲指定で配列のインデックスを取得する
  3. int index = Random.Range(0, dice.Length);
  4.  
  5. // サイコロの目を取得する
  6. int pips = dice[index];
  7. Debug.Log("サイコロの目は " + pips + " でした。");
  8. }
Add Comment
Please, Sign In to add comment