Method StopFollowing
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
StopFollowing(UniStormSystem)
The invariant, in one call: UniStorm follows a hero or it is off. Detaches the weather holders first, so the hero that is about to be destroyed cannot take them, then turns the system off and clears its player transform - a destroyed transform left in that field is what the next caller that does not check reads (a weather change, a spell), and the asset's own null checks only work on a real null.
Detaching is harmless when nothing is destroyed: the next FollowHero re-parents the same holders.
public static void StopFollowing(UniStormSystem system)
Parameters
systemUniStormSystem