Show / Hide Table of Contents

    Class ThingExtensions

    Static class with helper methods for things.

    Inheritance
    System.Object
    ThingExtensions
    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: Fibula.Mechanics.Contracts.Extensions
    Assembly: Fibula.Mechanics.Contracts.dll
    Syntax
    public static class ThingExtensions

    Methods

    | Improve this Doc View Source

    AddOrExtendCondition(IThing, ICondition)

    Adds or extends a condition to the afflicted thing.

    Declaration
    public static bool AddOrExtendCondition(this IThing thing, ICondition condition)
    Parameters
    Type Name Description
    IThing thing

    The thing to check the conditions on.

    ICondition condition

    The condition to add or extend.

    Returns
    Type Description
    System.Boolean

    True if the condition was added, false otherwise.

    | Improve this Doc View Source

    RemainingCooldownTime(IThing, ConditionType, DateTimeOffset)

    Calculates the remaining System.TimeSpan until the thing's condition is over.

    Declaration
    public static TimeSpan RemainingCooldownTime(this IThing thing, ConditionType type, DateTimeOffset currentTime)
    Parameters
    Type Name Description
    IThing thing

    The thing to check the conditions on.

    ConditionType type

    The type of exhaustion.

    System.DateTimeOffset currentTime

    The current time to calculate from.

    Returns
    Type Description
    System.TimeSpan

    The System.TimeSpan result.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.