Esempio n. 1
0
 protected override void Construct()
 {
     name     = "Start Node";
     position = new Rect(CanvasGUI.CanvasToScreenPosition(CanvasGUI.CanvasRect.center), ResourceManager.START_NODE_SIZE);
     nodules  = NoduleDatabase.CreateNew(this);
     nodules.Add(BaseNodule.Create <OutputNodule> (this));
     DialogueEditorGUI.Cache.SaveNewObject(this, false);
 }
Esempio n. 2
0
 protected virtual void Construct(string nodeTitle, Vector2 nodePos, string nodeTextArea, Actor nodeActor)
 {
     name = nodeTitle;
     position.position = nodePos;
     textArea          = nodeTextArea;
     actor             = nodeActor;
     nodules           = NoduleDatabase.CreateNew(this);
     DialogueEditorGUI.Cache.SaveNewObject(this);
 }
 protected void Construct(string nodeTitle, string nodeTextArea, MainNode main)
 {
     name     = nodeTitle;
     textArea = nodeTextArea;
     mainNode = main;
     actor    = DialogueEditorGUI.Cache.Actors.Get(0);
     nodules  = NoduleDatabase.CreateNew(this);
     DialogueEditorGUI.Cache.SaveNewObject(this, mainNode);
 }
Esempio n. 4
0
 public override void Init()
 {
     if (!nodules)
     {
         Debug.LogError("");
         nodules = NoduleDatabase.CreateNew(this);
     }
     nodules.Init();
 }
        protected virtual void Construct(string _name, BaseNode _mainNode)
        {
            name     = _name;
            mainNode = (NoduleTypes.CheckCompatibility(_mainNode, this)) ? _mainNode : null;
            nodules  = NoduleDatabase.CreateNew(this);

            if (mainNode)
            {
                DialogueEditorGUI.Cache.SaveNewObject(this, mainNode);
            }
        }
        public override void Init()
        {
            if (!mainNode)
            {
                Debug.LogError("");
                Delete();
            }

            if (nodules == null)
            {
                Debug.LogError("");
                nodules = NoduleDatabase.CreateNew(this);
            }

            foreach (BaseNodule connectedNodule in nodules)
            {
                if (!connectedNodule.nodules.Contains(this))
                {
                    Debug.LogError("");
                    connectedNodule.nodules.Add(connectedNodule);
                }
            }
        }