コード例 #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);
 }
コード例 #2
0
ファイル: NodeReducers.cs プロジェクト: zxx2112/TankBattle
 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);
 }
コード例 #3
0
 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);
 }