Ejemplo n.º 1
0
 /// <summary>
 /// 恢复节点允许状态
 /// </summary>
 /// <param name="pairs"></param>
 public void ReadNodes(Technology[] pairs)
 {
     if (pairs == null)
     {
         return;
     }
     foreach (var pair in pairs)
     {
         foreach (var Technology in allTechnology)
         {
             TechnologyNode TechnologyNode = Technology.GetComponent <TechnologyNode>();
             if (TechnologyNode.name.Equals(pair.name))
             {
                 if (pair.isResearch)
                 {
                     TechnologyNode.SetAvailable();
                 }
                 if (pair.isComplete)
                 {
                     TechnologyNode.SetComplete();
                 }
                 //if (pair.progress != 0)
                 //{
                 //    StartTec(pair.name);
                 //}
             }
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 设置可用
 /// </summary>
 /// <param name="TechnologyName"></param>
 public void SetAvailable(string TechnologyName)
 {
     foreach (var Technology in allTechnology)
     {
         TechnologyNode node = Technology.GetComponent <TechnologyNode>();
         if (node.name.Equals(TechnologyName))
         {
             node.SetAvailable();
         }
     }
 }