using System.Collections.Generic; using UnityEngine; namespace SanAndreasUnity.Behaviours.Peds { public class DeadBody : MonoBehaviour { private static List _deadBodies = new List(); public static IEnumerable DeadBodies => _deadBodies; public static int NumDeadBodies => _deadBodies.Count; private void OnEnable() { _deadBodies.Add(this); } private void OnDisable() { _deadBodies.Remove(this); } } }