Exemplo n.º 1
0
        public GraphAsset GetClone()
        {
            GraphAsset instance = Instantiate(this);

            instance.isInstance = true;
            return(instance);
        }
Exemplo n.º 2
0
 public void OnGraphChange(GraphAsset last, GraphAsset current)
 {
     if (current == null || last == current)
     {
         return;
     }
     CopyParameters(current.graph);
 }
Exemplo n.º 3
0
 public override void Initialize()
 {
     if (!reference.isInstance)
     {
         reference = reference.GetClone();
     }
     reference.graph.macro = this;
     reference.Play(Current.controller);
     base.Initialize();
 }
Exemplo n.º 4
0
 public void PlayGraph()
 {
     SetThisCurrent();
     if (graph)
     {
         if (!graph.isInstance)
         {
             graph = graph.GetClone();
         }
         graph.Play(this);
     }
 }
Exemplo n.º 5
0
        public MacroNode AddMacro(GraphAsset reference, Vector2 position = default(Vector2))
        {
            if (!reference)
            {
                return(null);
            }
            MacroNode instance = AddNode <MacroNode>(position, false);

            instance.reference = reference;
            instance.Validate();
            instance.OnGraphAdd();
            return(instance);
        }