Ejemplo n.º 1
0
    public SubNodeListComponentUnit AddUnit(SubNodeParameter parameter)
    {
        SubNodeParameter p = parameter;

        p.canOutput = true;
        this.AddNodeWindow(p);
        return(SubNodeListComponentUnit.Instantiate(MainViweModel.instance.SubNodeListComponentUnitPrefab, this.gameObject, p));
    }
Ejemplo n.º 2
0
 public NodesParameter(ParameterType type, Dictionary <string, string> dic) : base(type, dic)
 {
     if (dic.ContainsKey("list"))
     {
         foreach (string str in dic["list"].Split(','))
         {
             Dictionary <string, string> d = new Dictionary <string, string>()
             {
                 { "tag", str },
                 { "optional", "true" }
             };
             SubNodeParameter p = new SubNodeParameter(ParameterType.subNode, d);
             this.list.Add(p);
         }
     }
 }
Ejemplo n.º 3
0
 public SubNodeListPlusUnit AddUnit(SubNodeParameter parameter)
 {
     parameter.canOutput = false;
     return(SubNodeListPlusUnit.Instantiate(MainViweModel.instance.SubNodeListPlusUnitPrefab, window.gameObject, parameter, subNodeComponent));
 }
Ejemplo n.º 4
0
    public static SubNodeListComponentUnit Instantiate(GameObject prefab, GameObject parent, SubNodeParameter parameter)
    {
        SubNodeListComponentUnit obj = Instantiate(prefab, parent.transform).GetComponent <SubNodeListComponentUnit>();

        obj.parameter = parameter;
        if (parameter.optional)
        {
            obj.removeButtonobj.SetActive(true);
        }
        obj.title.text  = obj.node.title ?? "no title";
        obj.icon.sprite = ImageIO.GetIcon(obj.node.iconName);
        return(obj);
    }
Ejemplo n.º 5
0
    public static SubNodeListPlusUnit Instantiate(GameObject prefab, GameObject parent, SubNodeParameter parameter, SubNodeListComponent subNodeComponent)
    {
        SubNodeListPlusUnit obj = Instantiate(prefab, parent.transform).GetComponent <SubNodeListPlusUnit>();

        obj.subNodeComponent = subNodeComponent;
        obj.parameter        = parameter;
        obj.icon.sprite      = ImageIO.GetIcon(obj.node.iconName);
        obj.title.text       = obj.node.title;
        return(obj);
    }
Ejemplo n.º 6
0
 public void AddNodeWindow(SubNodeParameter p)
 {
     DOVirtual.DelayedCall(0.1f, () => MainViweModel.instance.AddWindow(p.subNode, false, prentWindow));
 }