Example #1
0
 static State ChangeNodeColor(State previousState, ChangeNodeColorAction action)
 {
     foreach (var nodeModel in action.NodeModels)
     {
         ((NodeModel)nodeModel).ChangeColor(action.Color);
     }
     previousState.MarkForUpdate(UpdateFlags.None);
     return(previousState);
 }
Example #2
0
 static State ChangeNodeColor(State previousState, ChangeNodeColorAction action)
 {
     foreach (var nodeModel in action.NodeModels.OfType <NodeModel>())
     {
         Undo.RecordObject(nodeModel.NodeAssetReference, "Change Color");
         nodeModel.ChangeColor(action.Color);
     }
     previousState.MarkForUpdate(UpdateFlags.None);
     return(previousState);
 }
 static State ChangeNodeColor(State previousState, ChangeNodeColorAction action)
 {
     Undo.RegisterCompleteObjectUndo((Object)previousState.AssetModel, "Change Color");
     EditorUtility.SetDirty((Object)previousState.AssetModel);
     foreach (var nodeModel in action.NodeModels.OfType <NodeModel>())
     {
         nodeModel.ChangeColor(action.Color);
     }
     previousState.MarkForUpdate(UpdateFlags.None);
     return(previousState);
 }