Class ActionFinishedCondition
A condition measuring how many actions are finished.
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain.Overmind
Assembly: BotBrain.Overmind.dll
Syntax
public class ActionFinishedCondition : RequirementBase, IRequirement, IEquatable<IRequirement?>, IMetadataAccess
Remarks
Note this does not reset when a bot crashes.
Constructors
View SourceActionFinishedCondition(string?, uint?)
A condition measuring how many actions are finished.
Declaration
public ActionFinishedCondition(string? name = null, uint? count = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | The requirement name. |
uint? | count | The desired count of finished actions. |
Remarks
Note this does not reset when a bot crashes.
Properties
View SourceCount
Gets or sets the desired count of finished actions.
Declaration
public uint Count { get; set; }
Property Value
Type | Description |
---|---|
uint |
CurrentCount
Gets the current count of finished actions.
Declaration
[JsonIgnore]
public uint CurrentCount { get; }
Property Value
Type | Description |
---|---|
uint |
Methods
View SourceCreateMetadata()
Used to create parameter metadata.
Declaration
protected override MetadataContainer CreateMetadata()
Returns
Type | Description |
---|---|
MetadataContainer | A metadata container. |
Overrides
View SourceOnStarted(IRoleBasedScenario, OvermindState)
Called when the scenario starts.
Declaration
public override void OnStarted(IRoleBasedScenario scenario, OvermindState state)
Parameters
Type | Name | Description |
---|---|---|
IRoleBasedScenario | scenario | The scenario. |
OvermindState | state | The overmind state. |
Overrides
View SourceToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |
Overrides
View SourceUpdate(IRoleBasedScenario, OvermindState)
Determines if the requirement is satisfied.
Declaration
public override bool Update(IRoleBasedScenario scenario, OvermindState state)
Parameters
Type | Name | Description |
---|---|---|
IRoleBasedScenario | scenario | The scenario. |
OvermindState | state | The overmind state. |
Returns
Type | Description |
---|---|
bool | True if it's satisfied. |