Пример #1
0
        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);
        }
Пример #2
0
        public override void OnInspectorGUI()
        {
            EditorGUI.BeginChangeCheck();

            WeightedBranch myTarget = (WeightedBranch)target;

            _list.Draw();


            if (EditorGUI.EndChangeCheck())
            {
                myTarget.HasChanges = true;
            }
        }
Пример #3
0
        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);
        }
Пример #4
0
        void OnEnable()
        {
            WeightedBranch myTarget = (WeightedBranch)target;

            _list = new WeigthReorderableList(myTarget);
        }
Пример #5
0
 public WeigthReorderableList(WeightedBranch node) : base(node.Variables.GetAll())
 {
     _node = node;
 }