r2mods/ilspy_dump/ror2_csproj/EntityStates.Merc/WhirlwindGround.cs

29 lines
738 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
namespace EntityStates.Merc;
public class WhirlwindGround : WhirlwindBase
{
private static int WhirlwindGroundStateHash = Animator.StringToHash("WhirlwindGround");
private static int LightImpactStateHash = Animator.StringToHash("LightImpact");
private static int WhirlwindParamHash = Animator.StringToHash("Whirlwind.playbackRate");
protected override void PlayAnim()
{
PlayCrossfade("FullBody, Override", WhirlwindGroundStateHash, WhirlwindParamHash, duration, 0.1f);
}
public override void OnExit()
{
base.OnExit();
int layerIndex = animator.GetLayerIndex("Impact");
if (layerIndex >= 0)
{
animator.SetLayerWeight(layerIndex, 3f);
PlayAnimation("Impact", LightImpactStateHash);
}
}
}