Class HeroController
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
[DisallowMultipleComponent]
public class HeroController : MonoBehaviour
- Inheritance
-
objectHeroController
Fields
- AutoJoinParty
Makes hero automatically join the party when it's in the scene
Properties
- 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
namefor a destroyed object. Answering null lets the UI read that as "no hero yet", which is the truth at that moment.
Methods
- 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.