AbilityType - jimdroberts/FishMMO GitHub Wiki

Description

Represents the type of ability, such as physical or magical, and whether it is grounded or aerial. This enum is used in the FishMMO system to categorize abilities for logic, effects, and UI presentation.


API Access

Fields

  • None = 0

    No ability type.

  • Physical

    Physical ability type.

  • Magic

    Magical ability type.

  • GroundedPhysical

    Grounded physical ability type.

  • GroundedMagic

    Grounded magical ability type.

  • AerialPhysical

    Aerial physical ability type.

  • AerialMagic

    Aerial magical ability type.


Basic Usage

Setup

  1. Use AbilityType to categorize abilities in templates, scripts, or logic.
  2. Assign the appropriate enum value to abilities to control their behavior and presentation.
  3. Integrate with ability logic to apply effects or restrictions based on type.
  4. No additional configuration is required; values are set in code or via the Unity Inspector where supported.

Example

// Example 1: Using AbilityType in an Ability Template

// This example demonstrates how to use the AbilityType enum to categorize
// and control the behavior of an ability in the FishMMO system.

public class MyAbility : MonoBehaviour
{
    public AbilityType type = AbilityType.Physical;

    void ApplyAbility()
    {
        if (type == AbilityType.Magic)
        {
            // Apply magical effects
        }
        else if (type == AbilityType.Physical)
        {
            // Apply physical effects
        }
    }
}
⚠️ **GitHub.com Fallback** ⚠️