예제 #1
0
    private SkillNode InitNodeByScript(List <IShooterSkill> skills, IShooterSkill ss)
    {
        SkillNode first = new SkillNode();

        first.SkillId  = ss.GetSkillId();
        first.Category = ss.GetCategory();
        //FIXME:临时解锁全部技能,by lixiaojiang
        first.IsLocked = false;
        IShooterSkill nextSkillScript = GetSkillById(skills, ss.GetNextSkillId());

        if (nextSkillScript != null)
        {
            first.NextSkillNode = InitNodeByScript(skills, nextSkillScript);
        }
        IShooterSkill qSkillScript = GetSkillById(skills, ss.GetQSkillId());

        if (qSkillScript != null)
        {
            first.SkillQ = InitNodeByScript(skills, qSkillScript);
        }
        IShooterSkill eSkillScript = GetSkillById(skills, ss.GetESkillId());

        if (eSkillScript != null)
        {
            first.SkillE = InitNodeByScript(skills, eSkillScript);
        }
        return(first);
    }