Пример #1
0
 public virtual void Dispose()
 {
     if (m_propHandle != null)
     {
         m_propHandle.Reset();
     }
     m_propHandle = null;
 }
Пример #2
0
        public void RemoveProperty <T>(PropertyH <T> ph)
        {
            if (ph.idx < 0 || ph.idx >= m_properties.Count)
            {
                return;
            }
            var p = m_properties[ph.idx];

            m_properties[ph.idx] = null;
            if (p != null)
            {
                p.Clear();
            }
        }
Пример #3
0
        public void AddProperty <T>(PropertyH <T> ph) where T : new()
        {
            int idx = 0;
            int end = m_properties.Count;

            for (; idx < end;)
            {
                if (m_properties[idx] == null)
                {
                    break;
                }
                idx++;
            }
            if (idx == end)
            {
                m_properties.Add(null);
            }
            m_properties[idx] = new Property <T>(ph);
            ph.Set(idx);
        }
Пример #4
0
 public Property(PropertyH ph) : base(ph)
 {
 }
Пример #5
0
 public Property <T> GetProperty <T>(PropertyH <T> ph) where T : new()
 {
     return(this[ph.idx] as Property <T>);
 }
Пример #6
0
 public BaseProperty(PropertyH propH)
 {
     m_propHandle = propH;
 }