예제 #1
0
    public void deletePageSkill(SKILL _skill)
    {
        for (int i = 0; i < pageSkills.Count; i++)
        {
            if (pageSkills[i].getSkillID() == _skill.getSkillID())
            {
                pageSkills.RemoveAt(i);//从列表里删除,使用的情况: 1.释放完全结束 2. 引导时被中断
                //还要写一下内存释放?
            }
        }

        //print for test
        outputPageSkillsForTest();
    }
예제 #2
0
 // Update is called once per frame
 void Update()
 {
     if (state == PEOPLE.END_SKILL)
     {
         SKILL current_skill = this.GetComponent <InfoControl>().current_skill;
         SKILL basicSkill    = this.GetComponent <InfoControl>().basicSkill;
         if (current_skill.getSkillID() == basicSkill.getSkillID())
         {
             //回复技能冷却时间和引导时间
             basicSkill.cd_time_left   = basicSkill.cd_time;
             basicSkill.boot_time_left = basicSkill.boot_time;
         }
         else
         {
             this.GetComponent <InfoControl>().deletePageSkill(current_skill);
         }
         transStateTo(PEOPLE.FREE);
         current_skill = null;
         return;
     }
 }