Class ManipulationActionExtensions
- Namespace
- MoonBark.GridPlacement.Core.Types
- Assembly
- MoonBark.GridPlacement.Core.dll
Extension methods for ManipulationAction.
public static class ManipulationActionExtensions
- Inheritance
-
ManipulationActionExtensions
- Inherited Members
Methods
IsCreationAction(ManipulationAction)
Determines whether this action creates a new object.
public static bool IsCreationAction(this ManipulationAction action)
Parameters
actionManipulationActionThe action to check.
Returns
- bool
True if Build.
Remarks
Creation actions may require resource validation before allowing placement. They differ from transform actions because the origin position may not contain an entity.
IsDestructionAction(ManipulationAction)
Determines whether this action removes an object.
public static bool IsDestructionAction(this ManipulationAction action)
Parameters
actionManipulationActionThe action to check.
Returns
- bool
True if Demolish.
Remarks
Destruction actions may trigger resource refunds, cascade removals, or special effects.
IsTransformAction(ManipulationAction)
Determines whether this action modifies an existing object's transform (position/rotation/flip).
public static bool IsTransformAction(this ManipulationAction action)
Parameters
actionManipulationActionThe action to check.
Returns
- bool
True if Move, Rotate, FlipH, or FlipV.
Remarks
Transform actions preserve the entity's existence; they reposition/reorient without creating or destroying. Contrast with IsCreationAction(ManipulationAction) and IsDestructionAction(ManipulationAction).
ToDisplayString(ManipulationAction)
Converts ManipulationAction to a display string suitable for UI or logging.
public static string ToDisplayString(this ManipulationAction action)
Parameters
actionManipulationAction