Пример #1
0
            public object?GetNthMask(int index)
            {
                WeaponBasicStats_FieldIndex enu = (WeaponBasicStats_FieldIndex)index;

                switch (enu)
                {
                case WeaponBasicStats_FieldIndex.Value:
                    return(Value);

                case WeaponBasicStats_FieldIndex.Weight:
                    return(Weight);

                case WeaponBasicStats_FieldIndex.Damage:
                    return(Damage);

                default:
                    throw new ArgumentException($"Index is out of range: {index}");
                }
            }
Пример #2
0
            public void SetNthMask(int index, object obj)
            {
                WeaponBasicStats_FieldIndex enu = (WeaponBasicStats_FieldIndex)index;

                switch (enu)
                {
                case WeaponBasicStats_FieldIndex.Value:
                    this.Value = (Exception?)obj;
                    break;

                case WeaponBasicStats_FieldIndex.Weight:
                    this.Weight = (Exception?)obj;
                    break;

                case WeaponBasicStats_FieldIndex.Damage:
                    this.Damage = (Exception?)obj;
                    break;

                default:
                    throw new ArgumentException($"Index is out of range: {index}");
                }
            }