Show / Hide Table of Contents

Class TotalTimeCondition

A condition measuring how long since the scenario began.

Inheritance
object
RequirementBase
TotalTimeCondition
Implements
IRequirement
IEquatable<IRequirement>
IMetadataAccess
Inherited Members
RequirementBase.Name
RequirementBase.Type
RequirementBase.ParameterNames
RequirementBase.Equals(IRequirement)
RequirementBase.Equals(object)
RequirementBase.GetHashCode()
RequirementBase.GetParameterMetadata(string)
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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 Source

TotalTimeCondition(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 Source

Duration

Gets or sets the duration to wait.

Declaration
public TimeSpan Duration { get; set; }
Property Value
Type Description
TimeSpan

Methods

View Source

CreateMetadata()

Used to create parameter metadata.

Declaration
protected override MetadataContainer CreateMetadata()
Returns
Type Description
MetadataContainer

A metadata container.

Overrides
RequirementBase.CreateMetadata()
View Source

OnStarted(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
RequirementBase.OnStarted(IRoleBasedScenario, OvermindState)
View Source

ToString()

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
RequirementBase.ToString()
View Source

Update(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.

Overrides
RequirementBase.Update(IRoleBasedScenario, OvermindState)

Implements

IRequirement
IEquatable<T>
IMetadataAccess
  • View Source
In this article
Back to top Generated by DocFX