Exemplo n.º 1
0
    private void HandleCompoundAbsorbing(float delta)
    {
        // max here buffs compound absorbing for the smallest cells
        var grabRadius = Mathf.Max(Radius, 3.0f);

        cloudSystem.AbsorbCompounds(GlobalTransform.origin, grabRadius, Compounds,
                                    TotalAbsorbedCompounds, delta, Membrane.Type.ResourceAbsorptionFactor);

        if (IsPlayerMicrobe && CheatManager.InfiniteCompounds)
        {
            var usefulCompounds = SimulationParameters.Instance.GetCloudCompounds().Where(Compounds.IsUseful);
            foreach (var usefulCompound in usefulCompounds)
            {
                Compounds.AddCompound(usefulCompound, Compounds.Capacity - Compounds.GetCompoundAmount(usefulCompound));
            }
        }
    }