Example #1
0
    private void ApplyPlayerParams()
    {
        PlayerConditionModule component = Player.Get().GetComponent <PlayerConditionModule>();
        float num = component.GetNutritionCarbo() * this.m_CarboLoss;

        component.DecreaseNutritionCarbo(num + this.m_CarboLossFromEating);
        num = component.GetNutritionFat() * this.m_FatLoss;
        component.DecreaseNutritionFat(num + this.m_FatLossFromEating);
        num = component.GetNutritionProtein() * this.m_ProteinsLoss;
        component.DecreaseNutritionProtein(num + this.m_ProteinsLossFromEating);
        num = component.GetHydration() * this.m_HydrationLoss;
        component.DecreaseHydration(num + this.m_HydrationLossFromDrinking + this.m_HydrationLossFromEating);
        this.m_HydrationLossFromDrinking = 0f;
        this.m_CarboLossFromEating       = 0f;
        this.m_ProteinsLossFromEating    = 0f;
        this.m_FatLossFromEating         = 0f;
        this.m_HydrationLossFromEating   = 0f;
    }