Class HeroComponent

Namespace
TDMaker.Core.Components
Assembly
TDMaker.Core.dll

Independent hero progression and resurrection state.

public sealed class HeroComponent
Inheritance
HeroComponent
Inherited Members

Constructors

HeroComponent()

public HeroComponent()

Properties

Experience

Cumulative resolved experience.

public double Experience { get; }

Property Value

double

FreePoints

Remaining skill points at the current level.

public int FreePoints { get; }

Property Value

int

Level

One-based hero level.

public int Level { get; }

Property Value

int

Life

Current resurrection stage.

public HeroLife Life { get; }

Property Value

HeroLife

PendingExperience

Experience queued for the hero progression stage.

public double PendingExperience { get; }

Property Value

double

Profile

Immutable profile for this instance.

public HeroProfileDef Profile { get; }

Property Value

HeroProfileDef

RespawnRemaining

Game seconds until the hero is active again; waiting includes the configured return duration. Active heroes return zero.

public float RespawnRemaining { get; }

Property Value

float

Examples

float seconds = entity.Hero.RespawnRemaining;

Remarks

Derived from fixed simulation time. A zero countdown can await the next eligible resurrection tick.

SpentPoints

Points already spent on skill ranks.

public int SpentPoints { get; }

Property Value

int

State

Read-only view alias for the existing resurrection stage.

public HeroLife State { get; }

Property Value

HeroLife

Methods

GetSkillRank(int)

Reads a purchased or unlocked skill rank.

public int GetSkillRank(int index)

Parameters

index int

Returns

int