void IEcsSystem.Destroy() { _world.OnComponentDetach -= OnComponentDetach; _world.UnsubscribeFromEvent <DestroyEvent> (OnDestroyEntity); Debug.LogFormat("{0} => destroy", GetType().Name); }
void IEcsSystem.Destroy() { Debug.LogFormat("{0} => destroy", GetType().Name); _world.UnsubscribeFromEvent <ControlEvent> (OnControlEntity); }
void OnDisable() { _world.UnsubscribeFromEvent <int> (OnScore); _world.Destroy(); _world = null; }