int Priority { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Priority property of the MoveModeSwim class determines the priority level of the swimming movement mode within the movement system. This integer value is used to decide which movement mode should be active when multiple modes are available. A higher priority value indicates a higher precedence over other movement modes.

Usage

To use the Priority property, you can get or set its value to control the precedence of the swimming mode in relation to other movement modes. This is particularly useful when implementing custom movement logic where multiple modes might be applicable.

Example

// Example of setting the Priority property
MoveModeSwim swimMode = new MoveModeSwim();
swimMode.Priority = 10; // Set a high priority for swimming mode

// Example of getting the Priority property
int currentPriority = swimMode.Priority;
// Use currentPriority to make decisions in your movement logic