r2mods/ilspy_dump/ror2_csproj/EntityStates.VoidJailer.Weapon/Fire.cs

55 lines
1.3 KiB
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
namespace EntityStates.VoidJailer.Weapon;
public class Fire : GenericProjectileBaseState
{
public static string animationLayerName;
public static string animationStateName;
public static string animationPlaybackRateName;
public static int totalProjectileCount;
public static float maxRandomDistance;
public static float basePriorityReductionDuration;
private float priorityReductionDuration;
private Transform muzzleTransform;
public override void OnEnter()
{
muzzleTransform = FindModelChild("ClawMuzzle");
base.OnEnter();
base.characterBody.SetAimTimer(duration + 3f);
for (int i = 1; i < totalProjectileCount; i++)
{
FireProjectile();
}
priorityReductionDuration = basePriorityReductionDuration / attackSpeedStat;
}
protected override Ray ModifyProjectileAimRay(Ray aimRay)
{
aimRay.origin += Random.insideUnitSphere * maxRandomDistance;
return aimRay;
}
protected override void PlayAnimation(float duration)
{
PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateName, duration);
}
public override InterruptPriority GetMinimumInterruptPriority()
{
if (!(base.fixedAge > priorityReductionDuration))
{
return InterruptPriority.PrioritySkill;
}
return InterruptPriority.Skill;
}
}