示例#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);
    }
示例#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);
    }