Exemple #1
0
        //执行
        public int Execute(NodeData wData)
        {
#if UNITY_EDITOR
            NodeRunSelEntityHelp.SetRunningNode(wData.Id, GetHashCode(), GetType().FullName);
#endif
            return(OnExcute(wData));
        }
Exemple #2
0
        protected override int OnExcute(NodeData wData)
        {
#if UNITY_EDITOR
            NodeRunSelEntityHelp.SetNeedRefresh(wData.Id);
#endif
            if (IsIndexValid(0))
            {
                Node node = GetChild <Node>(0);
                return(node.Execute(wData));
            }
            return(base.OnExcute(wData));
        }
Exemple #3
0
 private void Update()
 {
     if (Application.isPlaying)
     {
         float dlTime = Time.realtimeSinceStartup - Timer;
         if (dlTime >= TimeRefreshRunningNode)
         {
             NodeRunSelEntityHelp.RefreshRunningNode();
             Timer = Time.realtimeSinceStartup + dlTime;
         }
     }
 }
Exemple #4
0
        public void Draw()
        {
            IsRunning = NodeRunSelEntityHelp.CheckIsRunningNode(MId);
            if (IsRunning)
            {
                GUI.color = Color.green;
            }
            else
            {
                GUI.color = Color.white;
            }
            GUI.Window(Id, mRect, DrawNodeWindow, Name);
            if (ParEditor != null)
            {
                EDLine.CreateBezierLine(mRect.center, ParEditor.mRect.center, 2.5f, Color.gray);
            }

            Json.PosX = mRect.position.x;
            Json.PosY = mRect.position.y;
        }