Table of Contents

Class StatsScalingComponent

Namespace
ElectricDrill.SoapRpgFramework.Scaling.ScalingComponents
Assembly
com.electricdrill.soap-rpg-framework.Runtime.dll

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

public class StatsScalingComponent : SoSetScalingComponentBase<StatSet, Stat>, IValueProvider<Stat, double>
Inheritance
object
StatsScalingComponent
Implements
Inherited Members

Methods

GetEntitySet(EntityCore)

Gets the StatSet from the specified entity.

protected override StatSet GetEntitySet(EntityCore entity)

Parameters

entity EntityCore

The entity.

Returns

StatSet

The entity's StatSet.

GetEntityValue(EntityCore, Stat)

Gets the value of a specific stat from the entity.

protected override long GetEntityValue(EntityCore entity, Stat key)

Parameters

entity EntityCore

The entity.

key Stat

The stat to get the value of.

Returns

long

The value of the stat.

GetSetItems()

Gets the collection of stats from the associated StatSet.

protected override IEnumerable<Stat> GetSetItems()

Returns

IEnumerable<Stat>

An enumerable of stats.

ValidateEntitySet(EntityCore)

Validates that the entity's StatSet is equal to or contains the scaling component's StatSet. This allows entities with StatSets that include the component's StatSet to be compatible.

protected override void ValidateEntitySet(EntityCore entity)

Parameters

entity EntityCore

The entity to validate