ShellAnimator
An abstract class in Root.Township, Alta.PlayerEffects.
Client: draws an extra copy of a player's clothes with a shell material and animates its _Progress value, for effects like combat, stat effects and spirit mode.
- Listed in Players and characters
- Derived types
CombatShellAnimator,StatEffectShellAnimator,SpiritModeShellAnimator
Constructors
| Member | What it is |
|---|---|
ShellAnimator(PlayerCharacter character, Material shellMaterialSample) | Creates a ShellAnimator from character and shellMaterialSample. |
Fields
| Member | What it is |
|---|---|
protected Coroutine currentAnimation | The running progress coroutine, if any. |
5 private and internal fields
Properties
| Member | What it is |
|---|---|
PlayerCharacter Character { get; } | The player character the shell is on. |
ShellSetting CurrentSetting { get; set; } | The shell setting currently applied. |
Material ShellMaterial { get; } | This shell's own copy of the shell material, made on first use with progress 0. |
protected abstract string MeshName { get; } | Name of the mesh the shell is for, set by subclasses. |
protected IEnumerable<Renderer> Renderers { get; } | The shell renderers made by Initialize. |
Methods
| Member | What it is |
|---|---|
void Initialize(LODGroup lodGroup, SkinnedMeshRenderer[] opaqueClothes, SkinnedMeshRenderer[] headOpaqueClothes, bool isFirstPerson) | Client: copies the clothing renderers with the shell material and adds them to the LOD group. First person copies only one. |
void OnDestroy() | Cleans up the shell material. |
void SetShellRenderersEnabled(bool isActive) | Shows or hides every shell renderer. |
protected IEnumerator AnimateProgress(float start, float target, DurationCurve baseCurve, Action callback = null) (iterator) | Coroutine that animates the shell's progress along a curve, hiding the shell if it ends near 0 or 1, then runs the callback. |