r2mods/ilspy_dump/ror2_csproj/DestroyOnKill.cs

14 lines
320 B
C#

using RoR2;
using UnityEngine;
public class DestroyOnKill : MonoBehaviour, IOnKilledServerReceiver
{
public GameObject effectPrefab;
public void OnKilledServer(DamageReport damageReport)
{
Object.Instantiate(effectPrefab, base.transform.position, base.transform.rotation);
Object.Destroy(base.gameObject);
}
}