Interface ICustomTraitReward<TTrait1, TTrait2>
Custom implementation of a reward modifier based on trait data
Namespace: Unity.AI.Planner.Traits
Syntax
public interface ICustomTraitReward<TTrait1, TTrait2>
where TTrait1 : struct, ITrait where TTrait2 : struct, ITrait
Type Parameters
Name | Description |
---|---|
TTrait1 | Trait type |
TTrait2 | Trait type |
Methods
RewardModifier(TTrait1, TTrait2)
Return the value of a reward for 2 given traits
Declaration
float RewardModifier(TTrait1 trait1, TTrait2 trait2)
Parameters
Type | Name | Description |
---|---|---|
TTrait1 | trait1 | A trait from the action evaluated |
TTrait2 | trait2 | A trait from the action evaluated |
Returns
Type | Description |
---|---|
Single | Reward value modification |