Example #1
0
    public void RerollSelected(DelegateDiceroll callBack)
    {
        this.callBack = callBack;

        if (ReplaysManager.Mode == ReplaysMode.Write)
        {
            if (!Network.IsNetworkGame)
            {
                foreach (Die die in DiceList)
                {
                    if (die.IsSelected)
                    {
                        die.RandomizeRotation();
                    }
                }
                RerollPreparedDice();
            }
            else
            {
                if (DebugManager.DebugNetwork)
                {
                    UI.AddTestLogEntry("DiceRoll.SyncSelectedDice");
                }
                Network.SyncSelectedDiceAndReroll();
            }
        }
        else
        {
            CurrentDiceRoll.DeselectDice();

            Phases.CurrentSubPhase.IsReadyForCommands = true;
            Roster.GetPlayer(Phases.CurrentSubPhase.RequiredPlayer).SyncDiceResults();
        }
    }
Example #2
0
    public void RerollSelected(DelegateDiceroll callBack)
    {
        DiceRoll.CurrentDiceRoll = this;

        this.callBack = callBack;

        if (!ShouldSkipToSync())
        {
            foreach (Die die in DiceList)
            {
                if (die.IsSelected)
                {
                    die.RandomizeRotation();
                }
            }
            RerollPreparedDice();
        }
        else
        {
            CurrentDiceRoll.DeselectDice();

            Roster.GetPlayer(Phases.CurrentSubPhase.RequiredPlayer).SyncDiceResults();
        }
    }