Example #1
0
        /// <summary>
        /// Dispatches OnDestroyEntity which will start the destroy process.
        /// </summary>
        public void Destroy()
        {
            if (!_isEnabled)
            {
                throw new EntityIsNotEnabledException("Cannot destroy " + this + "!");
            }

            OnDestroyEntity?.Invoke(this);
        }
Example #2
0
 protected void DestroyEntity()
 {
     OnDestroyEntity?.Invoke(this);
 }