private void AddToRoll(DieModel _rollingDie) { _rollingDie.IsHeld = false; var _rollingIMG = RollingImageDictionary.First(x => x.Value == 0).Key; switch (_rollingDie.Value) { case 1: _rollingIMG.Source = ImageHelper.DiceOne(); break; case 2: _rollingIMG.Source = ImageHelper.DiceTwo(); break; case 3: _rollingIMG.Source = ImageHelper.DiceThree(); break; case 4: _rollingIMG.Source = ImageHelper.DiceFour(); break; case 5: _rollingIMG.Source = ImageHelper.DiceFive(); break; case 6: _rollingIMG.Source = ImageHelper.DiceSix(); break; } RollingImageDictionary[_rollingIMG] = _rollingDie.Id; _rollingIMG.Visibility = Visibility.Visible; }
private void HoldDie(DieModel _heldDie) { _heldDie.IsHeld = true; var _heldImage = HeldImageDictionary.First(x => x.Value == 0).Key; switch (_heldDie.Value) { case 1: _heldImage.Source = ImageHelper.DiceOne(); break; case 2: _heldImage.Source = ImageHelper.DiceTwo(); break; case 3: _heldImage.Source = ImageHelper.DiceThree(); break; case 4: _heldImage.Source = ImageHelper.DiceFour(); break; case 5: _heldImage.Source = ImageHelper.DiceFive(); break; case 6: _heldImage.Source = ImageHelper.DiceSix(); break; } HeldImageDictionary[_heldImage] = _heldDie.Id; _heldImage.Visibility = Visibility.Visible; }
private Vector3 logicalPosition; // position of the Die that ignores animation void Start() { metronome.GetComponent <Metronome>().AddLateObserver(this); dieModel = new DieModel(); currentSide = dieModel.Sides[Side.Back]; audioController = GetComponentInChildren <DieAudioController>(); logicalPosition = transform.position; }
private void heldFiveIMG_MouseDown(object sender, MouseButtonEventArgs e) { DieModel _rollingDie = (DieModel)DiceList.Find(x => x.Id == HeldImageDictionary[heldFiveIMG]); AddToRoll(_rollingDie); HeldImageDictionary[heldFiveIMG] = 0; heldFiveIMG.Visibility = Visibility.Collapsed; }
private void diceFiveIMG_MouseDown(object sender, MouseButtonEventArgs e) { DieModel _heldDie = (DieModel)DiceList.Find(x => x.Id == RollingImageDictionary[rollingFiveIMG]); HoldDie(_heldDie); RollingImageDictionary[rollingFiveIMG] = 0; rollingFiveIMG.Visibility = Visibility.Collapsed; }
public static DieModel createSeries1() { DieModel model = new DieModel(); model.iconsOnfaces.Add(edieIcon.boots); model.iconsOnfaces.Add(edieIcon.boots); model.iconsOnfaces.Add(edieIcon.provisions); model.iconsOnfaces.Add(edieIcon.fatigue); model.iconsOnfaces.Add(edieIcon.injury); model.iconsOnfaces.Add(edieIcon.fatigue); model.dieType = edieBaseType.series1; model.iconSource = ArrayList.Repeat(1, 6); return(model); }
public static DieModel createScout() { DieModel model = new DieModel(); model.iconsOnfaces.Add(edieIcon.boots); model.iconsOnfaces.Add(edieIcon.maps); model.iconsOnfaces.Add(edieIcon.boots); model.iconsOnfaces.Add(edieIcon.blades); model.iconsOnfaces.Add(edieIcon.cups); model.iconsOnfaces.Add(edieIcon.maps); model.dieType = edieBaseType.scout; model.iconSource = ArrayList.Repeat(1, 6); return(model); }
public static DieModel createSeries2() { DieModel model = new DieModel(); model.iconsOnfaces.Add(edieIcon.boots); model.iconsOnfaces.Add(edieIcon.boots); model.iconsOnfaces.Add(edieIcon.boots); model.iconsOnfaces.Add(edieIcon.camp); model.iconsOnfaces.Add(edieIcon.wayward); model.iconsOnfaces.Add(edieIcon.disaster); //model.iconsOnfaces.Add (edieIcon.boots); // second boot icon on first die facing model.dieType = edieBaseType.series2; model.iconSource = ArrayList.Repeat(1, 6); return(model); }