Description
The SwimLevel
property represents the current level of swimming capability or intensity for a character in the MoveModeSwim
class. This property is a floating-point value that ranges from 0 to 1, where 0 indicates no swimming capability and 1 indicates full swimming capability.
Usage
Use the SwimLevel
property to adjust or retrieve the current swimming intensity of a character. This can be useful for determining how effectively a character can swim in a given situation, such as when navigating through water.
The property is decorated with a RangeAttribute
to ensure that its value remains within the specified range of 0 to 1, with a step increment of 0.01. This ensures smooth transitions and adjustments to the swimming level.
Example
// Example of setting the SwimLevel property
MoveModeSwim swimMode = new MoveModeSwim();
swimMode.SwimLevel = 0.75f; // Set the swim level to 75%
// Example of getting the SwimLevel property
float currentSwimLevel = swimMode.SwimLevel;
Console.WriteLine($"Current Swim Level: {currentSwimLevel}");