示例#1
0
    public void UpdateModul()
    {
        if (loader == null)
        {
            loader = new EditorSkillResourceLoader( );
        }
        if (CurRoleId.Length == 0)
        {
            return;
        }
        if (CurSkillId.Length == 0)
        {
            return;
        }
        var role = skillsData.GetRole(CurRoleId);
        var s    = skillsData.GetSkill(CurSkillId);

        if (skill != null && skill.skillData != s)
        {
            ReleaseResource();
        }
        if (null == skill)
        {
            skill = new LCHSkill(loader, role, s);
        }
#if UNITY_EDITOR
        skill.CheckModulUpdate();
#endif
        skill.SetObjectParent();
    }
示例#2
0
    public void ReleaseResource()
    {
        //编辑器才会删主模型。
        if (null != skill)
        {
#if UNITY_EDITOR
            skill.ReleaseRoleModule();
#endif
            skill.Release();
            skill = null;
        }
    }