示例#1
0
    public void populateDetailsPanelByDeity(Deity deity)
    {
        currentDeity            = deity;
        DeityWorshipMethod.text = "" + deity.GetWorshipMethod();

        WorshipLevelSlider.value = CalculateWorshipLevel() / currentDeity.GetWorshipRequired();
    }
    public void populateDetailsPanel(Deity deity)
    {
        currentDeity       = deity;
        DeityName.text     = deity.GetName();
        WorshipMethod.text = "" + deity.GetWorshipMethod();
        amtWorshipRequired = deity.GetWorshipRequired();
        amtWorshipReceived = deity.GetWorshipReceived();
        satisfaction       = deity.GetSatisfaction();

        SatisfactionSlider.value = CalculateSatisfaction();
        WorshipLevelSlider.value = CalculateWorshipLevel();
    }
示例#3
0
    public float CalculateWorshipLevel()
    {
        if (currentCustomer == null)
        {
            return(0f);
        }

        if (currentCustomer.GetWorshipMethod() == currentDeity.GetWorshipMethod())
        {
            //   Debug.Log(currentDeity.GetWorshipReceived() + (((float)currentCustomer.GetSize()) * currentCustomer.GetFaith()));
            return(currentDeity.GetWorshipReceived() + (((float)currentCustomer.GetSize()) * currentCustomer.GetFaith()));
        }
        else
        {
            return(currentDeity.GetWorshipReceived() + (((float)currentCustomer.GetSize()) * currentCustomer.GetFaith() * 0.7f));
        }
    }