Пример #1
0
    public bool Delete()
    {
        Debug.Log(this.name + " Deleted");
        if (this.node != null)
        {
            //Debug.Log("Node Behaviour  node!=null");
            //this.node = null;
            this.node.Delete();
            return(true);
        }
        else
        {
            //Debug.Log("Node Behaviour  node==null");
            this.graphBehaviour.RemoveNodeBehaviour(this);
            //this.edge = null;
            this.graphBehaviour = null;
#if UNITY_EDITOR
            if (this != null)
            {
                GameObject.DestroyImmediate(this.gameObject);
            }
#else
            if (this != null)
            {
                GameObject.Destroy(this.gameObject);
            }
#endif
            return(false);
        }
    }
Пример #2
0
 public void InitializeBehaviour(Graph_Behaviour graphBehaviour, Edge edge, Node_Behaviour fromBehaviour, Node_Behaviour toBehaviour)
 {
     this.onGraphEvent   = new EventHandler(OnGraphEvent);
     this.GraphBehaviour = graphBehaviour;
     this.Edge           = edge;
     this.fromBehaviour  = fromBehaviour;
     this.ToBehaviour    = toBehaviour;
 }
Пример #3
0
 public void Awake()
 {
     graphBehaviour = target as Graph_Behaviour;
 }
Пример #4
0
 public void InitializeBehaviour(Graph_Behaviour graphBehaviour, Node node)
 {
     this.onGraphLayerChanged = new EventHandler(OnGraphEvent);
     this.GraphBehaviour      = graphBehaviour;
     this.Node = node;
 }