Table of Contents

Class AttributesScalingComponentSO

Namespace
ElectricDrill.AstraRpgFramework.Scaling.ScalingComponents
Assembly
com.electricdrill.astra-rpg-framework.Runtime.dll

A scaling component that calculates a value based on an entity's attributes.

[MovedFrom(true, "ElectricDrill.AstraRpgFramework.Scaling.ScalingComponents", "com.electricdrill.astra-rpg-framework.Runtime", "AttributesScalingComponent")]
public class AttributesScalingComponentSO : SoSetScalingComponentBase<AttributeSetSO, AttributeSO>, ITaggable, IValueProvider<AttributeSO, double>
Inheritance
object
AttributesScalingComponentSO
Implements
Inherited Members

Properties

ScalingAttributes

The attributes that contribute to this scaling component. Useful for components that need to know which attributes affect a derived value without enumerating and filtering the full configuration.

public IReadOnlyCollection<AttributeSO> ScalingAttributes { get; }

Property Value

IReadOnlyCollection<AttributeSO>

Methods

GetEntitySet(EntityCore)

Gets the AttributeSet from the specified entity.

protected override AttributeSetSO GetEntitySet(EntityCore entity)

Parameters

entity EntityCore

The entity.

Returns

AttributeSetSO

The entity's AttributeSet, or null if the entity has no EntityAttributes component.

GetEntityValue(EntityCore, AttributeSO)

Gets the value of a specific attribute from the entity.

protected override long GetEntityValue(EntityCore entity, AttributeSO key)

Parameters

entity EntityCore

The entity.

key AttributeSO

The attribute to get the value of.

Returns

long

The value of the attribute, or 0 if the entity has no EntityAttributes component.

GetEntityValueAt(EntityCore, AttributeSO, int)

Gets the attribute value as it would be computed at the specified level, bypassing the entity's cache so we can snapshot pre/post level-change values without cache poisoning.

protected override long GetEntityValueAt(EntityCore entity, AttributeSO key, int level)

Parameters

entity EntityCore
key AttributeSO
level int

Returns

long

GetSetItems()

Gets the collection of attributes from the associated AttributeSet.

protected override IEnumerable<AttributeSO> GetSetItems()

Returns

IEnumerable<AttributeSO>

An enumerable of attributes.