SanAndreasUnity/Assets/Scripts/Behaviours/Ped/DeadBody.cs

23 lines
544 B
C#
Raw Normal View History

2021-01-05 02:09:45 +00:00
using System.Collections.Generic;
using UnityEngine;
namespace SanAndreasUnity.Behaviours.Peds
{
public class DeadBody : MonoBehaviour
{
private static List<DeadBody> _deadBodies = new List<DeadBody>();
public static IEnumerable<DeadBody> DeadBodies => _deadBodies;
public static int NumDeadBodies => _deadBodies.Count;
private void OnEnable()
{
_deadBodies.Add(this);
}
private void OnDisable()
{
_deadBodies.Remove(this);
}
}
}