r2mods/ilspy_dump/ror2_csproj/EntityStates.Treebot.Unlock.../Unlock.cs

26 lines
620 B
C#
Raw Permalink Normal View History

2024-10-04 07:26:37 +00:00
using System;
using RoR2;
using RoR2.Mecanim;
using UnityEngine;
using UnityEngine.Networking;
namespace EntityStates.Treebot.UnlockInteractable;
public class Unlock : BaseState
{
private static int ReviveParamHash = Animator.StringToHash("Revive");
public static event Action<Interactor> onActivated;
public override void OnEnter()
{
base.OnEnter();
if (NetworkServer.active)
{
Unlock.onActivated?.Invoke(GetComponent<PurchaseInteraction>().lastActivator);
}
GetModelAnimator().SetBool(ReviveParamHash, value: true);
GetModelTransform().GetComponent<RandomBlinkController>().enabled = true;
}
}