//For card type in period get its coefficient of 'spended' resources to 'needed' public float GetResourceSumRate(CardType type) // what about needed to worked? { float result = 0f; if (_tasksWorkingResources.ContainsKey(type)) { HasExpectValues sums = _tasksWorkingResources[type]; result = (float)sums.Has / (float)sums.Expect; } return(result); }
public void UpdateTasksTime(int realTime, int baseTime) { if (_taskTimes == null) { _taskTimes = new HasExpectValues(realTime, baseTime); } else { _taskTimes.Has += realTime; _taskTimes.Expect += baseTime; } }