Class TimedOperation
Limits how often an operation can be performed through TryUseOperation.
Inheritance
System.Object
TimedOperation
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: GameKit.Dependencies.Utilities.Types
Assembly: GameKit.Dependencies.dll
Syntax
public class TimedOperation
Constructors
TimedOperation(Single, Boolean)
Declaration
public TimedOperation(float interval, bool scaledTime = false)
Parameters
Type | Name | Description |
---|---|---|
System.Single | interval | Interval frequency to allow operations. |
System.Boolean | scaledTime | True to compare against scaled time. |
Methods
TryUseOperation()
Returns if can perform operation at the configured interval.
Declaration
public bool TryUseOperation()
Returns
Type | Description |
---|---|
System.Boolean |
TryUseOperation(String)
Returns if can perform operation at the configured interval for the specified key.
Declaration
public bool TryUseOperation(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Returns
Type | Description |
---|---|
System.Boolean |