r2mods/ilspy_dump/ror2_csproj/EntityStates.Seeker/BaseWindDown.cs

52 lines
895 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using RoR2;
using UnityEngine;
namespace EntityStates.Seeker;
public class BaseWindDown : BaseScopeState
{
[SerializeField]
public float baseDuration;
[SerializeField]
public string enterSoundString;
private float duration;
public override void OnEnter()
{
base.OnEnter();
duration = baseDuration;
SetScopeAlpha(1f);
RemoveOverlay(duration);
StartScopeParamsOverride(0f);
EndScopeParamsOverride(duration);
Util.PlaySound(enterSoundString, base.gameObject);
}
public override void OnExit()
{
base.OnExit();
}
public override void FixedUpdate()
{
base.FixedUpdate();
if (base.isAuthority && base.fixedAge >= duration)
{
outer.SetNextStateToMain();
}
}
public override void Update()
{
base.Update();
SetScopeAlpha(1f - Mathf.Clamp01(base.age / duration));
}
protected override CharacterCameraParams GetCameraParams()
{
return null;
}
}