public DiceState(IDictionary <string, DiceData> dicesData, string currentDice, DicePhase currentDicePhase, string rolledValue) { DicesData = dicesData; CurrentDice = currentDice; CurrentDicePhase = currentDicePhase; RolledValue = rolledValue; }
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; }
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; } }