Esempio n. 1
0
        //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);
        }
Esempio n. 2
0
 public void UpdateTasksTime(int realTime, int baseTime)
 {
     if (_taskTimes == null)
     {
         _taskTimes = new HasExpectValues(realTime, baseTime);
     }
     else
     {
         _taskTimes.Has    += realTime;
         _taskTimes.Expect += baseTime;
     }
 }