Singleton container responsible for managing active Lemmings and their associated relationships. Provides central tracking, registration, and runtime access to all active Lemming objects and their connections to LemmingRelationships, supporting UI, analysis, and dynamic manipulation across scenes.
More...
Inherits MonoBehaviour.
|
|
void | Awake () |
| | Establish the Instance as singular and set it to remain active through scene changes.
|
|
void | Update () |
| | This updates the shepherd's dictionary and the Scriptable Object concurrently. The scriptable object can't update itself for each frame and so this calls it from the scene. This way you can access the data from either the SO or the Shepherd, depending on your project structure.
|
| string | GetRoleForLemming (string name, LemmingRelationship relationship) |
| | Attempts to resolve a role name for a Lemming based on its assigned name in the relationship mapping.
|
Singleton container responsible for managing active Lemmings and their associated relationships. Provides central tracking, registration, and runtime access to all active Lemming objects and their connections to LemmingRelationships, supporting UI, analysis, and dynamic manipulation across scenes.
◆ GetRoleForLemming()
| string Lemmings.LemmingShepherd.GetRoleForLemming |
( |
string | name, |
|
|
LemmingRelationship | relationship ) |
|
inlineprivate |
Attempts to resolve a role name for a Lemming based on its assigned name in the relationship mapping.
- Parameters
-
| name | The name of the Lemming. |
| relationship | The relationship context for resolution. |
- Returns
- The assigned role if found, otherwise "Unknown".
◆ Register()
| void Lemmings.LemmingShepherd.Register |
( |
Lemming | lemming | ) |
|
|
inline |
Registers a Lemming to the shepherd if it has not already been added.
- Parameters
-
| lemming | The Lemming component to be registered. |
◆ RegisterRelationship()
◆ Unregister()
| void Lemmings.LemmingShepherd.Unregister |
( |
Lemming | lemming | ) |
|
|
inline |
Unregisters a Lemming and removes any relationship mappings associated with it.
- Parameters
-
| lemming | The Lemming component to be removed. |
◆ UnregisterRelationship()
Removes a LemmingRelationship from tracking, including cleaning up all lemming-to-relationship mappings.
- Parameters
-
The documentation for this class was generated from the following file:
- Assets/Lemmings/Scripts/Classes/LemmingShepherd.cs