コード例 #1
0
        /// <summary>Gets or sets the layer contents using raw map coordinates (not CPos!)</summary>
        public T this[MPos uv]
        {
            get
            {
                return(entries[Index(uv)]);
            }

            set
            {
                entries[Index(uv)] = value;

                CellEntryChanged?.Invoke(uv.ToCPos(GridType));
            }
        }
コード例 #2
0
        /// <summary>Gets or sets the <see cref="CellLayer"/> using cell coordinates</summary>
        public T this[CPos cell]
        {
            get
            {
                return(entries[Index(cell)]);
            }

            set
            {
                entries[Index(cell)] = value;

                CellEntryChanged?.Invoke(cell);
            }
        }