Exemplo n.º 1
0
 //It is posible that a producer will have a call to get its cache before
 //its start fuction has been called. Call InitCache in the start and get functions
 //to ensure that the cache is always init before being returned.
 void InitCache()
 {
     if (m_cache == null)
     {
         m_cache = m_cacheGO.GetComponent <TileCache>();
         m_id    = m_cache.NextProducerId();
         m_cache.InsertProducer(m_id, this);
     }
 }
Exemplo n.º 2
0
 //It is posible that a producer will have a call to get its cache before
 //its start fuction has been called. Call InitCache in the start and get functions
 //to ensure that the cache is always init before being returned.
 void InitCache()
 {
     if(m_cache == null)
     {
         m_cache = m_cacheGO.GetComponent<TileCache>();
         m_id = m_cache.NextProducerId();
         m_cache.InsertProducer(m_id, this);
     }
 }