コード例 #1
0
ファイル: ActionHandler.cs プロジェクト: avidvid/OUP
 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);
     }
 }