Beispiel #1
0
 public void CheckIfObjectIsScheduled(ProjectObject projectObject)
 {
     if (projectObject.activities.Count > 0)
     {
         if (!Activities.instance.userIsGC)
         {
             List <string> activities = projectObject.activities.FindAll(activity => Activities.instance.permittedActivities.Contains(activity));
             bool          scheduled  = true;
             for (int i = 0; i < activities.Count; i++)
             {
                 if (!projectObject.scheduledActivities.Contains(activities[i]))
                 {
                     scheduled = false;
                     break;
                 }
             }
             if (scheduled)
             {
                 projectObject.Fade();
                 projectObject.isScheduled = true;
             }
             else
             {
                 projectObject.UnFade();
                 projectObject.isScheduled = false;
             }
         }
         else
         {
             if (projectObject.scheduledActivities.Count >= projectObject.activities.Count)
             {
                 projectObject.Fade();
                 projectObject.isScheduled = true;
             }
             else
             {
                 projectObject.UnFade();
                 projectObject.isScheduled = false;
             }
         }
     }
     if (projectObject.loaded)
     {
         if (projectObject.isScheduled)
         {
             projectObject.SetLayer("Scheduled");
         }
         else
         {
             projectObject.SetLayer("Unscheduled");
         }
     }
 }
Beispiel #2
0
 public void OnHoverExit()
 {
     if (ObjectSelection.instance.IsObjectSelected(projectObject))
     {
         projectObject.SetMaterial(MaterialManager.instance.selectionMaterial);
     }
     else if (ObjectSelection.instance.IsPrereqObjSelected(projectObject))
     {
         projectObject.SetMaterial(MaterialManager.instance.prereqMaterial);
     }
     else
     {
         projectObject.SetMaterial(projectObject.defaultMaterial);
         if (projectObject.isScheduled)
         {
             projectObject.Fade();
         }
     }
 }