Skip to content

Class: Hero ​

csharp
[RequireComponent(typeof(HeroSkill))]
public class Hero : Entity, ILogicUpdate, ICleanup, ICustomDestroyRoutine, IExcludeFromPool

Fields ​

NameDeclarationDescription
accessories`[SaveVar(SaveVarFlags.Default)]
public readonly SyncList<string> accessories`
cDestruction`[BoxGroup("Constellation Settings", true, false, 0)]
public HeroConstellationSettings cDestruction`
cDisplayBaseAngle`[BoxGroup("Constellation Settings", true, false, 0)]
public float cDisplayBaseAngle`
cFlexible`[BoxGroup("Constellation Settings", true, false, 0)]
public HeroConstellationSettings cFlexible`
cImagination`[BoxGroup("Constellation Settings", true, false, 0)]
public HeroConstellationSettings cImagination`
classType`[BoxGroup("Hero Settings", true, false, 0)]
public Hero.HeroClassType classType`
ClientHeroEvent_OnIsInCombatChangedpublic SafeAction&lt;bool&gt; ClientHeroEvent_OnIsInCombatChanged
ClientHeroEvent_OnKillOrAssistpublic SafeAction&lt;EventInfoKill&gt; ClientHeroEvent_OnKillOrAssist
ClientHeroEvent_OnKnockedOutpublic SafeAction&lt;EventInfoKill&gt; ClientHeroEvent_OnKnockedOut
ClientHeroEvent_OnLevelChangedpublic SafeAction&lt;EventInfoHeroLevelUp&gt; ClientHeroEvent_OnLevelChanged
ClientHeroEvent_OnRevivepublic SafeAction&lt;Hero&gt; ClientHeroEvent_OnRevive
ClientHeroEvent_OnSkillUsepublic SafeAction&lt;EventInfoSkillUse&gt; ClientHeroEvent_OnSkillUse
cLife`[BoxGroup("Constellation Settings", true, false, 0)]
public HeroConstellationSettings cLife`
decoConstellationPrefab`[BoxGroup("Hero Settings", true, false, 0)]
public GameObject decoConstellationPrefab`
difficulty`[BoxGroup("Hero Settings", true, false, 0)]
public Hero.HeroDifficulty difficulty`
dismantleProcessorpublic DataProcessorGroup&lt;int, Hero, Actor&gt; dismantleProcessor
excludeFromPool`[BoxGroup("Hero Settings", true, false, 0)]
public bool excludeFromPool`
HeroEvent_OnAbilityInstanceBeforePrepareFromSkillpublic SafeAction&lt;EventInfoSkillAbilityInstance&gt; HeroEvent_OnAbilityInstanceBeforePrepareFromSkill
HeroEvent_OnAbilityInstanceCreatedFromSkillpublic SafeAction&lt;EventInfoSkillAbilityInstance&gt; HeroEvent_OnAbilityInstanceCreatedFromSkill
icon`[BoxGroup("Hero Settings", true, false, 0)]
public Sprite icon`
InCombatCheckIntervalpublic const float InCombatCheckInterval = 0.5
isWeaponHolstered`[NonSerialized]
public bool isWeaponHolstered`Checked locally.
mainColor`[BoxGroup("Hero Settings", true, false, 0)]
public Color mainColor`
MarkAsInCombatDurationpublic const float MarkAsInCombatDuration = 2
maxLevelOverridepublic int? maxLevelOverride
summons`[NonSerialized]
public List<Summon> summons`Available everywhere.

Properties ​

NameDeclarationDescription
exp`[SaveVar(SaveVarFlags.ApplyAfterCreation)]
public int exp { get; }`
isDestroyedOnRoomChangepublic override bool isDestroyedOnRoomChange { get; }
isInCombatpublic bool isInCombat { get; }Did this hero dealt damage to an enemy or took damage from an enemy?Available everywhere.
isKnockedOutpublic bool isKnockedOut { get; }
loadoutpublic HeroLoadoutData loadout { get; set; }
maxExppublic int maxExp { get; }
maxLevelpublic int maxLevel { get; }
Skillpublic HeroSkill Skill { get; }
skinpublic string skin { get; set; }

Methods ​

ActiveLogicUpdate(float) ​

csharp
protected override void ActiveLogicUpdate(float dt)

Parameters:

NameTypeDescription
dtfloat

AIUpdate(ref EntityAIContext) ​

csharp
protected override void AIUpdate(ref EntityAIContext context)

Parameters:

NameTypeDescription
contextEntityAIContext

Awake() ​

csharp
protected override void Awake()

CmdTeleportToWaypoint(Room_Waypoint) ​

csharp
public void CmdTeleportToWaypoint(Room_Waypoint waypoint)

Parameters:

NameTypeDescription
waypointRoom_Waypoint

FrameUpdate() ​

csharp
public override void FrameUpdate()

GetConstellationSettings(StarType) ​

csharp
public HeroConstellationSettings GetConstellationSettings(StarType type)

Parameters:

NameTypeDescription
typeStarType

Returns: HeroConstellationSettings

GetStaggerSettings() ​

csharp
protected override Entity.StaggerSettings GetStaggerSettings()

Returns: Entity.StaggerSettings

IsMeleeHero() ​

csharp
public bool IsMeleeHero()

Returns: bool

IsRangedHero() ​

csharp
public bool IsRangedHero()

Returns: bool

LoadEntityModelLocal() ​

csharp
public override void LoadEntityModelLocal()

MarkAsInCombat() ​

csharp
public void MarkAsInCombat()

OnDestroyActor() ​

csharp
protected override void OnDestroyActor()

OnLateStartServer() ​

csharp
public override void OnLateStartServer()

OnModelLoaded() ​

csharp
public override void OnModelLoaded()

OnStart() ​

csharp
public override void OnStart()

OnStartAuthority() ​

csharp
public override void OnStartAuthority()

OnStartServer() ​

csharp
public override void OnStartServer()

OnStopAuthority() ​

csharp
public override void OnStopAuthority()

ReceiveExperience(int) ​

Add to experience of this hero.

csharp
public void ReceiveExperience(int amount)

Parameters:

NameTypeDescription
amountint

Maintained by the Shape of Dreams Modding Community