public WeightedBranchLayout(Node node) : base(node) { _node = (WeightedBranch)node; headerColor = new Color(0.27f, 0.43f, 0.53f, 1f); bodyColor = new Color(0, 0, 0, 1f); width = 175; _iTrans = transitions.Find(x => x.PinType == PinType.TransIn); }
public override void OnInspectorGUI() { EditorGUI.BeginChangeCheck(); WeightedBranch myTarget = (WeightedBranch)target; _list.Draw(); if (EditorGUI.EndChangeCheck()) { myTarget.HasChanges = true; } }
public override Node Copy(bool runtime = false) { WeightedBranch copy = (WeightedBranch)base.Copy(runtime); copy.Weights = new List <WeightData>(); foreach (var w in Weights) { var copyW = new WeightData() { OutputName = w.OutputName, VariableName = w.VariableName }; copy.Weights.Add(copyW); } return(copy); }
void OnEnable() { WeightedBranch myTarget = (WeightedBranch)target; _list = new WeigthReorderableList(myTarget); }
public WeigthReorderableList(WeightedBranch node) : base(node.Variables.GetAll()) { _node = node; }