Class TotalTimeCondition
A condition measuring how long since the scenario began.
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain.Overmind
Assembly: BotBrain.Overmind.dll
Syntax
public class TotalTimeCondition : RequirementBase, IRequirement, IEquatable<IRequirement?>, IMetadataAccess
Remarks
Note this starts counting from when the bots are all launched. If any bots are removed from the scenario, it resets and waits for new bots to join.
Constructors
View SourceTotalTimeCondition(string?, TimeSpan?, IDateTimeSource?)
A condition measuring how long since the scenario began.
Declaration
public TotalTimeCondition(string? name = null, TimeSpan? duration = null, IDateTimeSource? dateTimeSource = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | The requirement name. |
TimeSpan? | duration | How long to wait. |
IDateTimeSource | dateTimeSource | The date time source. |
Remarks
Note this starts counting from when the bots are all launched. If any bots are removed from the scenario, it resets and waits for new bots to join.
Properties
View SourceDuration
Gets or sets the duration to wait.
Declaration
public TimeSpan Duration { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
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. |