Table of Contents

Class FractionAttribute

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

A component field sent as a fraction of another (.Fraction(comp, value, max, bits, name, group)): health of max health.

[AttributeUsage(AttributeTargets.Field, Inherited = false)]
public sealed class FractionAttribute : Attribute
Inheritance
FractionAttribute
Inherited Members

Constructors

FractionAttribute(string)

A fraction of the field named maxField.

public FractionAttribute(string maxField)

Parameters

maxField string

The same component's field holding the maximum; nameof it.

Properties

Bits

The fraction's bits.

public int Bits { get; set; }

Property Value

int

Group

The change group; the builder's default when unset.

public string Group { get; set; }

Property Value

string

MaxField

The field holding the maximum.

public string MaxField { get; }

Property Value

string

Name

The wire name — required: neither the value's name nor the maximum's describes the ratio.

public string Name { get; set; }

Property Value

string