csharp
public sealed class WaterProfileCommandChanging a body's profile, as one undo entry.
Remarks
What a handle drag commits to. One entry for the whole drag rather than one per pointer move, which is TerrainStrokeCommand's arrangement and its reason: a drag is one thing an author did, and forty entries is an undo stack nobody can walk back through.
⚠ It holds the value before and the value after rather than a delta. A delta applied twice is a profile that drifts, and an undo stack is replayed in both directions — which is exactly when a drift becomes visible and impossible to attribute.
Fields and properties (1)
public string NameWhat this is called in the undo history, as a person would say it.
Methods (3)
public WaterProfileCommand(World world, Entity entity, WaterBodyComponent before, WaterBodyComponent after)Changing a body's profile, as one undo entry.
public void Do(EditorContext context)Applies the change.
public void Undo(EditorContext context)Puts back exactly what Do changed.
Used by (1)
- WaterModeVixen.Editor.Water