using System.Collections.Generic; using NodeCanvas.Framework; using ParadoxNotion.Design; using UnityEngine; namespace NodeCanvas.DialogueTrees { [Category("Branch")] [Description("Select a child to execute based on it's chance to be selected. An optional pre-Condition Task can be assigned to filter the child in or out of the selection probability.\nThe actor selected will be used for the condition checks.")] [ParadoxNotion.Design.Icon("ProbabilitySelector")] [Color("b3ff7f")] public class ProbabilitySelector : DTNode { public class Option { public BBParameter weight; public ConditionTask condition; public Option(float weightValue, IBlackboard bbValue) { weight = new BBParameter { value = weightValue, bb = bbValue }; condition = null; } } [SerializeField, AutoSortWithChildrenConnections] private List