Example #1
0
    public float GetSpecialProductPercentage(string bonusName, string squadName, out int units) // Bonuses of Units
    {
        float ans = 0.0f;

        units = 0;

        ProductTask pt = productsOnWork.Find(x => x.prodType == ProductType.bonusProd && x.productName == bonusName && x.bonusInfo.squadOwner == squadName);

        if (pt != null)
        {
            ans   = pt.GetPercentage();
            units = pt.productUnits;
        }

        return(ans);
    }
Example #2
0
    public float GetSpecialProductPercentage(string productName, out int units) // Battle Units
    {
        float ans = 0.0f;

        units = 0;

        //Debug.Log("productName: " + productName);
        ProductTask pt = productsOnWork.Find(x => x.productName == productName);

        if (pt != null)
        {
            ans   = pt.GetPercentage();
            units = pt.productUnits;
        }

        return(ans);
    }