r2mods/ilspy_dump/ror2_csproj/EntityStates.RoboCratePod/Descent.cs

32 lines
663 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using EntityStates.SurvivorPod;
using RoR2;
using UnityEngine;
using UnityEngine.Networking;
namespace EntityStates.RoboCratePod;
public class Descent : EntityStates.SurvivorPod.Descent
{
public static GameObject effectPrefab;
protected override void TransitionIntoNextState()
{
base.TransitionIntoNextState();
EffectManager.SimpleMuzzleFlash(effectPrefab, base.gameObject, "Base", transmit: true);
}
public override void OnExit()
{
VehicleSeat component = GetComponent<VehicleSeat>();
if ((bool)component)
{
component.EjectPassenger();
}
if (NetworkServer.active)
{
EntityState.Destroy(base.gameObject);
}
base.OnExit();
}
}