internal void RemoveFromUpdateEvent(Action UpdateFunction) { if (listUpdateCounter > 0) { ListOfUpdateEvent.Remove(UpdateFunction); listUpdateCounter--; } }
private void OnDisable() { if (ListOfUpdateEvent?.Count > 0) { ListOfUpdateEvent.Clear(); listUpdateCounter = 0; } if (listOfFixedUpdateEvent?.Count > 0) { listOfFixedUpdateEvent.Clear(); listFixedUpdateCounter = 0; } }
internal void AddToUpdateEvent(Action UpdateFunction) { ListOfUpdateEvent.AddLast(UpdateFunction); listUpdateCounter++; }