예제 #1
0
 public DiceState(IDictionary <string, DiceData> dicesData, string currentDice, DicePhase currentDicePhase, string rolledValue)
 {
     DicesData        = dicesData;
     CurrentDice      = currentDice;
     CurrentDicePhase = currentDicePhase;
     RolledValue      = rolledValue;
 }
예제 #2
0
 public void RollDice()
 {
     for (int i = 0; i < DiceQuantity; i++)
     {
         Dices[i].RollingResult = Random.Range(0, DiceDimensions - 1);
         Dices[i].isChosingPhase = true;
         Dices[i].ResetPosition();
     }
     if (IsChosingNeed) Phase = DicePhase.Chosing;
 }
예제 #3
0
 public void UpdatePhase()
 {
     var isChoseOver = true;
     foreach(var dice in Dices)
     {
         if (dice.Slot == -1)
         {
             isChoseOver = false;
         }
     }
     if (isChoseOver)
     {
         foreach (Dice dice in Dices)
         {
             dice.isChosingPhase = false;
         }
         this.Phase = DicePhase.Over;
     }
 }