public void ReferenceSetOrAdd(string mapname, IMapEvent mapevent)
        {
            lock(this.events)
            {
                if(this.events[mapname].Contains(mapevent))
                {
                    int index = this.events[mapname].IndexOf(mapevent);

                    this.events[mapname][index] = (IMapEvent)mapevent.Clone();
                }
                else
                    this.events[mapname].Add(mapevent);
            }
        }
示例#2
0
        public void SetOrAddEvent(IMapEvent e)
        {
            if (this.events[TileEngine.CurrentMapChunk].Contains(e))
            {
                int index = this.events[TileEngine.CurrentMapChunk].IndexOf(e);

                this.events[TileEngine.CurrentMapChunk][index] = (IMapEvent)e.Clone();
            }
            else
                this.events[TileEngine.CurrentMapChunk].Add(e);
        }