Exemplo n.º 1
0
    private void OnPersonReachedDemandHolder(string targetID)
    {
        float resource = demandKeeper.GetDemandResource(targetID);

        currentNeed.SatisfyNeed(resource, currentNeed.NeedType);

        UIManager.SetNeedValue(currentNeed.NeedType, currentNeed.GetRelativeLevel());
        UIManager.HighlightOff(currentNeed.NeedType);
    }
Exemplo n.º 2
0
    private Need GetHighestDemand()
    {
        Need highestDemand = null;

        foreach (var demand in needs)
        {
            if (highestDemand == null)
            {
                highestDemand = demand;
            }

            if (demand.GetRelativeLevel() > highestDemand.GetRelativeLevel())
            {
                highestDemand = demand;
            }
        }

        return(highestDemand);
    }