r2mods/ilspy_dump/ror2_csproj/EntityStates.Assassin2/ThrowShuriken.cs

52 lines
1.0 KiB
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using RoR2;
using UnityEngine;
namespace EntityStates.Assassin2;
public class ThrowShuriken : GenericProjectileBaseState
{
public static string attackString;
private Transform muzzleTransform;
private static int ThrowShurikenStateHash = Animator.StringToHash("ThrowShuriken");
public override void OnEnter()
{
base.OnEnter();
duration = baseDuration / attackSpeedStat;
PlayAnimation("Gesture", ThrowShurikenStateHash);
Util.PlaySound(attackString, base.gameObject);
GetAimRay();
string text = "ShurikenTag";
muzzleTransform = FindModelChild(text);
if ((bool)effectPrefab)
{
EffectManager.SimpleMuzzleFlash(effectPrefab, base.gameObject, text, transmit: false);
}
if (base.isAuthority)
{
FireProjectile();
}
}
public override void OnExit()
{
base.OnExit();
}
public override void FixedUpdate()
{
base.FixedUpdate();
if (base.fixedAge >= duration && base.isAuthority)
{
outer.SetNextStateToMain();
}
}
public override InterruptPriority GetMinimumInterruptPriority()
{
return InterruptPriority.Skill;
}
}