Ejemplo n.º 1
0
        public void ProgressTask(TaskBehaviour task, NPC npc)
        {
            if (task.CurrentLane == TodoLane)
            {
                MoveTaskToLane(task, DoingLane);

                task.IsStarted = true;
                task.StartTime = GameManager.Instance.Clock.GetTime().ToString();
                if (task.Owner == null)
                {
                    task.Owner = npc;
                }
            }
            else if (task.CurrentLane == DoingLane)
            {
                MoveTaskToLane(task, DoneLane);

                if (task.StartTime == "")
                {
                    var stamp = GameManager.Instance.Clock.GetTime() - new TimeStamp(0, 10, 0);
                    task.StartTime = stamp.ToString();
                }
                task.EndTime      = GameManager.Instance.Clock.GetTime().ToString();
                task.IsStarted    = true;
                task.IsDocumented = true;
                task.IsTested     = true;
                task.IsProgrammed = true;
            }
        }
Ejemplo n.º 2
0
 public void MoveTaskToLane(TaskBehaviour task, TaskboardLane lane)
 {
     task.transform.SetParent(lane.transform);
     task.CurrentLane = lane;
     if (lane.transform.childCount > lane.MaxTasks)
     {
         var child = lane.transform.GetChild(0).gameObject;
         child.SetActive(false);
         Destroy(child);
     }
 }