public sealed class GameplaySubjectOne thing's gameplay state: its stats, its tags and the effects running on it.
Remarks
The three pieces always travel together, so they are one object. An effect needs the stats to modify and the tags to grant; a requirement needs the stats to compare and the tags to test; a rule needs all three. Every gameplay library above the kernel takes one of these rather than three parameters, which is what stops half of them taking them in a different order.
Not a component. It holds three growable collections, and an archetype ECS stores columns of fixed-size rows — so what goes on an entity is a handle into whatever owns these, exactly as AiAgent holds a memory handle rather than a blackboard. Which component that is belongs to the library that needs it first, not to the kernel.
Fields and properties (3)
public AttributeSet AttributesIts stats.
public GameplayTagSet TagsIts tags — granted by effects, by equipment, by state, by anything.
public EffectSet EffectsThe effects running on it.
Methods (3)
public GameplaySubject(AttributeLayout layout)Makes one over a stat layout.
public bool TryGetValue(AttributeId subject, out float value)public int Tick(float delta, ICollection<EffectEvent>? events = null)Advances the effects and recomputes whatever they changed.
Used by (22)
- MmoRulesMmo.Shared
- AbilityCasterVixen.Gameplay.Combat
- AbilityCasterTestsVixen.Gameplay.Combat.Tests
- AbilityLibraryTestsVixen.Gameplay.Combat.Tests
- AbilityTargetVixen.Gameplay.Combat
- AbilityTemplateVixen.Gameplay.Combat
- CombatModuleTestsVixen.Gameplay.Combat.Tests
- CombatResolverVixen.Gameplay.Combat
- CombatResolverTestsVixen.Gameplay.Combat.Tests
- ContentVixen.Gameplay.Combat.Tests
- CriticalStrikeRuleVixen.Gameplay.Combat
- DamageEventVixen.Gameplay.Combat
- DamagePipelineTestsVixen.Gameplay.Combat.Tests
- DamageRuleTestsVixen.Gameplay.Combat.Tests
- EffectSetTestsVixen.Gameplay.Tests
- EventBusTestsVixen.Gameplay.Quests.Tests
- GameplaySubjectTestsVixen.Gameplay.Tests
- HealthRuleVixen.Gameplay.Combat
- QuestJournalTestsVixen.Gameplay.Quests.Tests
- RequirementTestsVixen.Gameplay.Tests
- ResistanceRuleVixen.Gameplay.Combat
- ShieldAbsorbRuleVixen.Gameplay.Combat