public void OnClassChanged(Class class_)
        {
            _dieType          = CharacterSheetModel.GetHitDieTypeByClass(class_);
            dieAvailable.text = _dieType.ToString();

            // Invalidate any previous rolls
            dieResult.text = InvalidDieResult;
        }
Esempio n. 2
0
        private void AddRolls(DieType dieType, uint count, List <DiceRolls> diceRolls)
        {
            var rollRequest = new Dictionary <string, uint> {
                { dieType.ToString(), count }
            };
            var result = _manager.RollDice(rollRequest);

            diceRolls.Add(result);
        }
Esempio n. 3
0
        public override string ToString()
        {
            string toString = Name + ", ";

            toString += HealType.ToString() + ", ";
            toString += DieType.ToString() + ", ";
            toString += NumberOfDice.ToString() + ", ";
            toString += Modifier.ToString();

            return(toString);
        }
Esempio n. 4
0
        internal void SetTypeByDie(DieType dieType)
        {
            switch (dieType.ToString())
            {
            case "d8":
                this.comboBox1.SelectedIndex = 0;
                break;

            case "d10":
                this.comboBox1.SelectedIndex = 1;
                break;

            case "d12":
                this.comboBox1.SelectedIndex = 2;
                break;
            }
        }
Esempio n. 5
0
        internal void SetTypeByDie(DieType dieType)
        {
            switch (dieType.ToString())
            {
                case "d8":
                    this.comboBox1.SelectedIndex = 0;
                    break;

                case "d10":
                    this.comboBox1.SelectedIndex = 1;
                    break;

                case "d12":
                    this.comboBox1.SelectedIndex = 2;
                    break;
            }
        }
Esempio n. 6
0
 public override string ToString()
 {
     return(DieType.ToString() + "," + Modifier);
 }
Esempio n. 7
0
        private int GetIndexForType(DieType type)
        {
            int count = 0;
            foreach (string name in Enum.GetNames(typeof(DieType)))
            {
                if (name == type.ToString())
                    return count;

                count += 1;
            }

            return -1;
        }
 private void Start()
 {
     // Arbitrarily chose Barbarian to be the default
     _dieType          = CharacterSheetModel.GetHitDieTypeByClass(Class.Barbarian);
     dieAvailable.text = _dieType.ToString();
 }