示例#1
0
            public object?GetNthMask(int index)
            {
                NpcSound_FieldIndex enu = (NpcSound_FieldIndex)index;

                switch (enu)
                {
                case NpcSound_FieldIndex.Sound:
                    return(Sound);

                case NpcSound_FieldIndex.SoundChance:
                    return(SoundChance);

                default:
                    throw new ArgumentException($"Index is out of range: {index}");
                }
            }
示例#2
0
            public void SetNthMask(int index, object obj)
            {
                NpcSound_FieldIndex enu = (NpcSound_FieldIndex)index;

                switch (enu)
                {
                case NpcSound_FieldIndex.Sound:
                    this.Sound = (Exception?)obj;
                    break;

                case NpcSound_FieldIndex.SoundChance:
                    this.SoundChance = (Exception?)obj;
                    break;

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