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)); }
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))); }
public static GroupNodeModel CreateGroupNode(this VSGraphModel graphModel, string name, Vector2 position) { return(graphModel.CreateNode <GroupNodeModel>(name, position)); }