Beispiel #1
0
    private void Register(IUpdate update)
    {
        if (updates.Contains(update))
        {
            Debug.LogWarning(string.Format("IUpdate {0} is already registered!", update.GetTransform().name));
            return;
        }

        updates.Add(update);
    }
Beispiel #2
0
    private void Unregister(IUpdate update)
    {
        if (!updates.Contains(update))
        {
            Debug.LogWarning(string.Format("Trying to unregister {0}, but it is not registered!", update.GetTransform().name));
            return;
        }

        updates.Remove(update);
    }