Exemplo n.º 1
0
 public void ConsumeElement()
 {
     if (_terrainManager.DestroyElement(_element, true))
     {
         Vector3 elementPos = _element.transform.position;
         //Remember Consume element to not draw them
         _cache.PersistAdd(new CacheContent()
         {
             Location       = elementPos,
             ObjectType     = "VacantElement",
             ExpirationTime = DateTime.Now.AddDays(2)
         }
                           );
         _terrainManager.TerrainDropItem(elementPos, _element.ElementTypeInUse.DropChance, _element.ElementTypeInUse.DropItems);
     }
 }