Esempio n. 1
0
        public static IVariableModel CreateVariableNodeNoUndo(this VSGraphModel graphModel,
                                                              IVariableDeclarationModel declarationModel, Vector2 position, SpawnFlags spawnFlags = SpawnFlags.Default)
        {
            if (declarationModel == null)
            {
                return(graphModel.CreateNode <ThisNodeModel>("this", position, SpawnFlags.CreateNodeAsset));
            }

            return(graphModel.CreateNode <VariableNodeModel>(declarationModel.Title, position, spawnFlags, v => v.DeclarationModel = declarationModel));
        }
Esempio n. 2
0
 public static T CreateLoopStack <T>(this VSGraphModel graphModel, Vector2 position,
                                     SpawnFlags spawnFlags = SpawnFlags.Default) where T : LoopStackModel
 {
     return(graphModel.CreateNode <T>("loopStack", position, spawnFlags, node => node.CreateLoopVariables(null)));
 }
Esempio n. 3
0
 public static GroupNodeModel CreateGroupNode(this VSGraphModel graphModel, string name, Vector2 position)
 {
     return(graphModel.CreateNode <GroupNodeModel>(name, position));
 }