Exemple #1
0
            public void SetNthMask(int index, object obj)
            {
                ArmorData_FieldIndex enu = (ArmorData_FieldIndex)index;

                switch (enu)
                {
                case ArmorData_FieldIndex.ArmorValue:
                    this.ArmorValue = (Exception?)obj;
                    break;

                case ArmorData_FieldIndex.Value:
                    this.Value = (Exception?)obj;
                    break;

                case ArmorData_FieldIndex.Health:
                    this.Health = (Exception?)obj;
                    break;

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

                default:
                    throw new ArgumentException($"Index is out of range: {index}");
                }
            }
Exemple #2
0
            public object?GetNthMask(int index)
            {
                ArmorData_FieldIndex enu = (ArmorData_FieldIndex)index;

                switch (enu)
                {
                case ArmorData_FieldIndex.ArmorValue:
                    return(ArmorValue);

                case ArmorData_FieldIndex.Value:
                    return(Value);

                case ArmorData_FieldIndex.Health:
                    return(Health);

                case ArmorData_FieldIndex.Weight:
                    return(Weight);

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