Description
The OnModeBegin
method is a virtual method in the MoveMode
class, which is part of the Sandbox.Movement
namespace. This method is called when a movement mode is initiated, allowing for any necessary setup or initialization specific to the mode being started.
Usage
Override this method in a derived class to implement custom behavior that should occur when the movement mode begins. This could include setting initial parameters, resetting state variables, or triggering animations specific to the mode.
Example
public class CustomMoveMode : MoveMode
{
public override void OnModeBegin()
{
// Custom initialization logic for the move mode
// For example, setting initial speed or direction
base.OnModeBegin();
// Additional custom logic here
}
}