MiniGames/Assets/Scripts/CubeClash/CubeClash_HazardMarker.cs

11 lines
295 B
C#

using UnityEngine;
public class CubeClash_HazardMarker : MonoBehaviour
{
public static int ActiveCount = 0;
void OnEnable() { ActiveCount++; }
void OnDisable() { ActiveCount = Mathf.Max(0, ActiveCount - 1); }
void OnDestroy() { ActiveCount = Mathf.Max(0, ActiveCount - 1); }
}