r2mods/ilspy_dump/ror2_csproj/DestroyOnKill.cs

14 lines
320 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
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);
}
}