Beispiel #1
0
 public bool CheckMana(int skill)
 {
     if (playerInfo.GetVital((int)VitalName.Mana).CurValue > playerInfo.GetMagicSkill(skill - 1).Mana)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #2
0
 void UpdateSkillCD()
 {
     for (int cnt = 0; cnt < 4; cnt++)
     {
         float lastSkillTime = playerInfo._skillCDTimer[cnt];
         if (lastSkillTime != 0)
         {
             if (Time.time - lastSkillTime >= playerInfo.GetMagicSkill(cnt).CDTime)
             {
                 if (hotKeyCDUI[cnt].fillAmount > 0)
                 {
                     hotKeyCDUI[cnt].fillAmount = 0;
                 }
             }
             else
             {
                 hotKeyCDUI[cnt].fillAmount = 1 - (float)((Time.time - lastSkillTime) / playerInfo.GetMagicSkill(cnt).CDTime);
             }
         }
         else
         {
             hotKeyCDUI[cnt].fillAmount = 0;
         }
     }
 }
Beispiel #3
0
    public void UpdateRoleEachSkillValue(TP_Info info, int role, int team)
    {
        int curValue = 0;

        for (int cnt = 0; cnt < 4; cnt++)
        {
            curValue = (int)info.GetMagicSkill(cnt).CurValue;
            roomEachSkillUIpage[cnt + ((role) + (team - 1) * 3) * 5].transform.Find("PowerTag/Value").GetComponent <UILabel>().text = curValue.ToString();
        }
        curValue = (int)info.GetSuperSkill().CurValue;
        roomEachSkillUIpage[4 + ((role) + (team - 1) * 3) * 5].transform.Find("PowerTag/Value").GetComponent <UILabel>().text = curValue.ToString();
    }