IArchetypeController - jimdroberts/FishMMO GitHub Wiki

Description

Interface for a character's archetype controller, providing access to the current archetype template. Defines the contract for exposing a character's archetype in the FishMMO system.


API Access

Properties

  • ArchetypeTemplate Template { get; }

    The archetype template currently assigned to this character.


Basic Usage

Setup

  1. Implement the IArchetypeController interface in your character controller class.
  2. Ensure the Template property returns the correct archetype for the character.

Example

// Example 1: Implementing IArchetypeController
public class MyArchetypeController : IArchetypeController {
    public ArchetypeTemplate Template { get; private set; }
    // ...implementation...
}

// Example 2: Accessing the archetype template
var template = archetypeController.Template;

Best Practices

  • Always implement the Template property to accurately reflect the character's current archetype.
  • Use the interface to decouple archetype logic from other character systems.
  • Extend the interface as needed for additional archetype-related functionality.
⚠️ **GitHub.com Fallback** ⚠️