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

            instance.isInstance = true;
            return(instance);
        }
Ejemplo n.º 2
0
 public void OnGraphChange(GraphAsset last, GraphAsset current)
 {
     if (current == null || last == current)
     {
         return;
     }
     CopyParameters(current.graph);
 }
Ejemplo n.º 3
0
 public override void Initialize()
 {
     if (!reference.isInstance)
     {
         reference = reference.GetClone();
     }
     reference.graph.macro = this;
     reference.Play(Current.controller);
     base.Initialize();
 }
Ejemplo n.º 4
0
 public void PlayGraph()
 {
     SetThisCurrent();
     if (graph)
     {
         if (!graph.isInstance)
         {
             graph = graph.GetClone();
         }
         graph.Play(this);
     }
 }
Ejemplo 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);
        }