Exemplo n.º 1
0
 public void switchSelect()
 {
     if (dieState == edieState.selected)
     {
         previousState = edieState.selected;
         dieState      = edieState.inHand;
     }
     else if (dieState == edieState.inHand)
     {
         previousState = edieState.inHand;
         dieState      = edieState.selected;
     }
 }
Exemplo n.º 2
0
    public void rollDie()
    {
        if (dieState == edieState.selected)
        {
            dieState = edieState.locked;
        }

        if ((dieState != edieState.locked) && (dieState != edieState.frozen))
        {
            previousResult = currentResult;
            currentResult  = (int)Random.Range(1, 7);
        }
    }