Example #1
0
 private void HubtasticBaseStation_DiceStoppedRolling(object sender, DiceEventArgs ea)
 {
     if (ea.DiceRollData != null)
     {
         History.Log("Die roll: " + ea.DiceRollData.roll);
     }
     EnableDiceRollButtons(true);
 }
 private void HubtasticBaseStation_DiceStoppedRolling(object sender, DiceEventArgs ea)
 {
     if (ea.StopRollingData.rollId == stampedeDieRollGuid)
     {
         HubtasticBaseStation.DiceStoppedRolling -= HubtasticBaseStation_DiceStoppedRolling;
         dieStoppedRolling = true;
         CheckIfDone();
     }
 }
        static void DiceHaveStoppedRolling(string diceData)
        {
            if (diceEventArgs == null)
            {
                diceEventArgs = new DiceEventArgs();
            }

            diceEventArgs.SetDiceData(diceData);
            OnDiceStoppedRolling(null, diceEventArgs);
        }
        static void AllDiceHaveBeenDestroyed(string diceData)
        {
            if (diceEventArgs == null)
            {
                diceEventArgs = new DiceEventArgs();
            }

            diceEventArgs.SetDiceData(diceData);
            OnAllDiceDestroyed(null, diceEventArgs);
        }
 private static void HubtasticBaseStation_DiceStoppedRolling(object sender, DiceEventArgs ea)
 {
     if (ea.StopRollingData.diceGroup == DiceGroup.Viewers)
     {
         if (logDieRollIds)
         {
             History.Log($"HubtasticBaseStation_DiceStoppedRolling - {ea.StopRollingData.rollId.Substring(ea.StopRollingData.rollId.Length - 4)}");
         }
         CardDto cardInWaiting = savedCardsForViewerDieRolls.FirstOrDefault(x => x.InstanceID == ea.StopRollingData.rollId);
         if (cardInWaiting != null)
         {
             savedCardsForViewerDieRolls.Remove(cardInWaiting);
             RollIsComplete(cardInWaiting, ea.StopRollingData);
         }
         clearDiceNowTimer.Start();
     }
 }
        private static void HubtasticBaseStation_AllDiceDestroyed(object sender, DiceEventArgs ea)
        {
            clearDiceNowTimer.Stop();
            if (ea.StopRollingData == null)
            {
                return;
            }

            if (ea.StopRollingData.diceGroup == DiceGroup.Viewers)
            {
                if (logDieRollIds)
                {
                    History.Log($"HubtasticBaseStation_AllDiceDestroyed - {ea.StopRollingData.rollId.Substring(ea.StopRollingData.rollId.Length - 4)}");
                }

                DequeueViewerRoll();
            }
        }
 public static void OnDiceStoppedRolling(object sender, DiceEventArgs ea)
 {
     DiceStoppedRolling?.Invoke(sender, ea);
 }
 public static void OnAllDiceDestroyed(object sender, DiceEventArgs ea)
 {
     DiceOnScreen = false;
     History.Log("DiceOnScreen = false;");
     AllDiceDestroyed?.Invoke(sender, ea);
 }