Table of Contents

Class HeroController

Namespace
GrindFest
Assembly
GrindFest.dll
[DisallowMultipleComponent]
public class HeroController : MonoBehaviour
Inheritance
object
HeroController

Fields

AsyncHero
AutoJoinParty

Makes hero automatically join the party when it's in the scene

AutomaticHero
Character
Class
CurrentArea
CurrentOverworldArea
Dungeon
Id
ImpulseSource
Interactive
Inventory
IsOnSharedNavMesh
LastDeathEvent
LastOverworldPosition
Level
Looks
MapMarkers
NavMeshBounds
NavMeshData
NavMeshDataInstance
NetworkHero
Party
PreviousArea
PreviousOverworldArea
PreviousSessionsTotalLifetime
SessionStartTime
Story

Properties

HeroName
IsAlive

The hero's display name. Guarded, because a destroyed HeroController still gets asked for it: the UI holds a reference to the old hero between CleanSlate destroying it and the next one existing, and Unity throws on name for a destroyed object. Answering null lets the UI read that as "no hero yet", which is the truth at that moment.

IsBotting
IsLocalPartyMember
SessionLifetime
TotalLifetime

Methods

OnAttack(AttackEvent)
OnDamaged(GetHitEvent)
OnKill(DeathEvent)
StartBotting()
StopBotting()
WaitForMapTilesToLoad()

Ensures that all map tiles under the hero's position are fully loaded before allowing physics to take effect

Events

OnIsBottingChanged

Fires only when IsBotting actually changes. The OneJS bot-control panel binds with useEventSync(hero, 'IsBotting'); without this event it would have to poll to know whether to draw Play or Pause.