Show / Hide Table of Contents

    Interface IStat

    Interface for stats in the game.

    Namespace: Fibula.Creatures.Contracts.Abstractions
    Assembly: Fibula.Creatures.Contracts.dll
    Syntax
    public interface IStat

    Properties

    | Improve this Doc View Source

    Current

    Gets this stat's current value.

    Declaration
    uint Current { get; }
    Property Value
    Type Description
    System.UInt32
    | Improve this Doc View Source

    Maximum

    Gets this stat's maximum value.

    Declaration
    uint Maximum { get; }
    Property Value
    Type Description
    System.UInt32
    | Improve this Doc View Source

    Percent

    Gets the current percentual value between current and maximum values.

    Declaration
    byte Percent { get; }
    Property Value
    Type Description
    System.Byte
    | Improve this Doc View Source

    Type

    Gets this stat's type.

    Declaration
    CreatureStat Type { get; }
    Property Value
    Type Description
    CreatureStat

    Methods

    | Improve this Doc View Source

    Decrease(Int32)

    Decreases this stats's value.

    Declaration
    bool Decrease(int value)
    Parameters
    Type Name Description
    System.Int32 value

    The amount by which to decrease this stat's value.

    Returns
    Type Description
    System.Boolean

    True if the value was actually decreased, false otherwise.

    | Improve this Doc View Source

    Increase(Int32)

    Increases this stats's value.

    Declaration
    bool Increase(int value)
    Parameters
    Type Name Description
    System.Int32 value

    The amount by which to increase this stat's value.

    Returns
    Type Description
    System.Boolean

    True if the value was actually increased, false otherwise.

    | Improve this Doc View Source

    Set(UInt32)

    Sets this stats's value.

    Declaration
    bool Set(uint value)
    Parameters
    Type Name Description
    System.UInt32 value

    The value to set in the stat. This is bounded by [0, Maximum].

    Returns
    Type Description
    System.Boolean

    True if the value was actually changed, false otherwise.

    Events

    | Improve this Doc View Source

    Changed

    Event triggered when this stat changes.

    Declaration
    event OnStatChanged Changed
    Event Type
    Type Description
    OnStatChanged

    Extension Methods

    ObjectExtensions.YieldSingleItem<T>(T)
    ObjectExtensions.GetPropertyValue(Object, String)
    Validate.ThrowIfNull(Object, String)
    • 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.