Ejemplo n.º 1
0
 //设定skill的状态
 public void skillStatus()
 {
     foreach (GameObject sk in skillList)
     {
         if (!magic.getSkillActivity(int.Parse(sk.name)) && !isDrop)
         {
             //showState.GetComponent<Button>().interactable = false;
             sk.GetComponent <Image>().color = Color.gray;
             foreach (Transform child in sk.transform)
             {
                 if (child.name == "Name")
                 {
                     child.GetComponent <Text>().color = Color.white;
                 }
             }
         }
         else if (!isDrop)
         {
             showState.GetComponent <Button>().interactable = true;
             sk.GetComponent <Image>().color = Color.white;
             foreach (Transform child in sk.transform)
             {
                 if (child.name == "Name")
                 {
                     child.GetComponent <Text>().color = Color.black;
                 }
             }
         }
         else if (isDrop)
         {
             sk.GetComponent <Image>().color = Color.red;
         }
         if (int.Parse(sk.name) + 1 > magic.getSkillCap())
         {
             sk.SetActive(false);
         }
         else
         {
             sk.SetActive(true);
         }
     }
 }