예제 #1
0
    public void AddEventOwner(EventOwner eventOwner)
    {
        if (eventOwner.IsUsingAwakeEarly() || eventOwner.IsUsingAwakeDefault() || eventOwner.IsUsingAwakeLate())
        {
            if (eventOwner.IsUsingAwakeEarly())
            {
                eventOwnersAwakeEarly.Add(eventOwner);
            }
            if (eventOwner.IsUsingAwakeDefault())
            {
                eventOwnersAwakeDefault.Add(eventOwner);
            }
            if (eventOwner.IsUsingAwakeLate())
            {
                eventOwnersAwakeLate.Add(eventOwner);
            }

            if (hasRunAwake)
            {
                if (eventOwner.IsUsingAwakeEarly())
                {
                    eventOwner.AwakeEarly();
                }
                if (eventOwner.IsUsingAwakeDefault())
                {
                    eventOwner.AwakeDefault();
                }
                if (eventOwner.IsUsingAwakeLate())
                {
                    eventOwner.AwakeLate();
                }
            }
        }

        if (eventOwner.IsUsingStartEarly() || eventOwner.IsUsingStartDefault() || eventOwner.IsUsingStartLate())
        {
            if (eventOwner.IsUsingStartEarly())
            {
                eventOwnersStartEarly.Add(eventOwner);
            }
            if (eventOwner.IsUsingStartDefault())
            {
                eventOwnersStartDefault.Add(eventOwner);
            }
            if (eventOwner.IsUsingStartLate())
            {
                eventOwnersStartLate.Add(eventOwner);
            }

            if (hasRunStart)
            {
                if (eventOwner.IsUsingStartEarly())
                {
                    eventOwner.StartEarly();
                }
                if (eventOwner.IsUsingStartDefault())
                {
                    eventOwner.StartDefault();
                }
                if (eventOwner.IsUsingStartLate())
                {
                    eventOwner.StartLate();
                }
            }
        }

        if (eventOwner.IsUsingUpdateEarly())
        {
            eventOwnersUpdateEarly.Add(eventOwner);
        }
        if (eventOwner.IsUsingUpdateDefault())
        {
            eventOwnersUpdateDefault.Add(eventOwner);
        }
        if (eventOwner.IsUsingUpdateLate())
        {
            eventOwnersUpdateLate.Add(eventOwner);
        }
    }