private void UpdateGrowth()
    {
        // check time of year for NatureObjectScript growing mode
        float gt = 0;

        if (CurrentGrowMode == -1)
        {
            gameNatureObject.despawnTime += Time.deltaTime;
            if (gameNatureObject.despawnTime >= 5)
            {
                gameNatureObject.despawnTime = 0;
                // randomly remove material
                if (Random.Range(0, 4) == 0 && ResourceCurrent.Amount > 0)
                {
                    ResourceCurrent.Take(1);
                    if (ResourceCurrent.Amount == 0)
                    {
                        Break();
                    }
                }
            }
        }
        else if (Size == MaxSize || Growth <= float.Epsilon)
        {
            if (Size > 1)
            {
                gameNatureObject.StopGrowth();
            }
            else
            {
                gt = 60f / ResourceGrowth;
                gameNatureObject.growthTime += Time.deltaTime * GameManager.speedFactor;
                if (gameNatureObject.growthTime >= gt)
                {
                    gameNatureObject.growthTime -= gt;
                    if (ResourceCurrent.Amount < ResourceMax.Amount)
                    {
                        ResourceCurrent.Add(1);
                    }
                }
            }
        }
        else if (Growth > float.Epsilon)
        {
            gt = 60f / (Growth);
            gameNatureObject.growthTime += Time.deltaTime * GameManager.speedFactor;
            transform.localScale         = Vector3.one * (NatureObject.minSize + (NatureObject.maxSize - NatureObject.minSize) * (Size + gameNatureObject.growthTime / gt) / MaxSize);
            if (gameNatureObject.growthTime >= gt)
            {
                gameNatureObject.growthTime -= gt;
                Grow();
            }
        }
    }
 public void TakeMaterial(int takeAmount)
 {
     ResourceCurrent.Take(takeAmount);
 }