public override void OnRemove() { if (Health != null) { Health.Killed -= OnKilled; } Health = null; }
public override void OnSpawn() { Health = Entity.GetComponentOrNull<Health>(); if (Health != null) { Health.Killed += OnKilled; } }