Declaration
public int D4();
Returns
int
– The result of the dice roll.
Description
Rolls a standard D4 when called and returns the result.
Example
using CarterGames.Common.General;
using UnityEngine;
public class DiceRoll : MonoBehaviour
{
private int roll;
private void OnEnable()
{
roll = Dice.D4();
}
}
Declaration
public int[] D4(int numberOfRolls);
Parameters
numberOfRolls | The number of times the dice should be rolled. |
Returns
int[]
– The result of the dice roll.
Description
Rolls a standard D4 multiple times when called and returns the result.
Example
using CarterGames.Common.General;
using UnityEngine;
public class DiceRoll : MonoBehaviour
{
private int roll;
private void OnEnable()
{
roll = Dice.D4(3);
}
}