r2mods/ilspy_dump/ror2_csproj/EntityStates.VoidRaidCrab/SpinBeamExit.cs

37 lines
721 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using RoR2;
using RoR2.Skills;
using UnityEngine;
namespace EntityStates.VoidRaidCrab;
public class SpinBeamExit : BaseSpinBeamAttackState
{
[SerializeField]
public SkillDef skillDefToReplaceAtStocksEmpty;
[SerializeField]
public SkillDef nextSkillDef;
public override void OnEnter()
{
base.OnEnter();
if ((bool)nextSkillDef)
{
GenericSkill genericSkill = base.skillLocator.FindSkillByDef(skillDefToReplaceAtStocksEmpty);
if ((bool)genericSkill && genericSkill.stock == 0)
{
genericSkill.SetBaseSkill(nextSkillDef);
}
}
}
public override void FixedUpdate()
{
base.FixedUpdate();
if (base.fixedAge >= base.duration && base.isAuthority)
{
outer.SetNextStateToMain();
}
}
}