Table of Contents

Method OverlayFollowsTheSelectedHero

Namespace
GrindFest
Assembly
GrindFest.dll

OverlayFollowsTheSelectedHero()

WHICH hero the player controls has to reach the panel without polling: the overlay binds Party.SelectedHero, and the party raises OnSelectedHeroChanged on a real change. The C# half and the UI half are asserted together on purpose - either can look fine while the pair is broken (an event nobody raises re-renders nothing, and a panel that only ever redraws by accident passes a re-read test).

Selection is moved by deselecting and selecting again rather than by switching between two heroes: a second hero costs a bot compile and a MaxHeroes fight, and the panel's reaction to the selection is the same event either way. The selection is restored in the finally, so the next test starts where it left.

public IEnumerator OverlayFollowsTheSelectedHero()

Returns

IEnumerator