r2mods/ilspy_dump/ror2_csproj/RoR2/Deployable.cs

31 lines
490 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using System;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Networking;
namespace RoR2;
public class Deployable : MonoBehaviour
{
[NonSerialized]
public CharacterMaster ownerMaster;
public UnityEvent onUndeploy;
private void OnDestroy()
{
if (NetworkServer.active && (bool)ownerMaster)
{
ownerMaster.RemoveDeployable(this);
}
}
public void DestroyGameObject()
{
if (NetworkServer.active)
{
UnityEngine.Object.Destroy(base.gameObject);
}
}
}