예제 #1
0
        public void Visit(SkillNode skillNode)
        {
            if (!skillNode.IsLocked())
            {
                skillNode.ShouldGoDown = true;
                return;
            }

            bool canBeUnlocked = true;

            skillNode.DependsOn
            .ForEach(baseSkillNode => canBeUnlocked = canBeUnlocked && !baseSkillNode.IsLocked());

            if (canBeUnlocked)
            {
                skillNode.SetCanBeUnlocked();
            }
            skillNode.ShouldGoDown = false;
        }