Ejemplo n.º 1
0
    /// <summary>
    /// 更新技能图标(打开时、技能升级时)
    /// </summary>
    private void UpdateSkillIcon()
    {
        PlayerShipSkillVO[] skills = m_SkillProxy.GetShipSkills();

        if (skills == null || skills.Length == 0)
        {
            return;
        }

        if (skills.Length > 0)
        {
            UpdateSkillIcon(m_SkillButton1, skills[0]);
        }
        if (skills.Length > 1)
        {
            UpdateSkillIcon(m_SkillButton2, skills[1]);
        }
        if (skills.Length > 2)
        {
            UpdateSkillIcon(m_SkillButton3, skills[2]);
        }
        if (skills.Length > 3)
        {
            UpdateSkillIcon(m_SkillButton4, skills[3]);
        }
    }