Example #1
0
            public object?GetNthMask(int index)
            {
                Placement_FieldIndex enu = (Placement_FieldIndex)index;

                switch (enu)
                {
                case Placement_FieldIndex.Position:
                    return(Position);

                case Placement_FieldIndex.Rotation:
                    return(Rotation);

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

                switch (enu)
                {
                case Placement_FieldIndex.Position:
                    this.Position = (Exception?)obj;
                    break;

                case Placement_FieldIndex.Rotation:
                    this.Rotation = (Exception?)obj;
                    break;

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