public void AddBehaviourAndSort(CoreMonoBeh beh) { //Safety check for overflow CheckForOverflowAndExpand(); LoopUpdateSettings settings = GetLoopSettings(beh); //Just throw it somewhere if the queue is already marked for sorting. //A nice early-out for batched additions. if (NeedsSorting) { queue[m_UpperBound] = beh; m_UpperBound++; return; } else if (settings.UpdateOrder >= UpperUpdateQueueBound) { queue[m_UpperBound] = beh; m_UpperBound++; m_UpperUpdateQueueBound = settings.UpdateOrder; } else if (settings.UpdateOrder <= LowerUpdateQueueBound && m_LowerBound > -1) { queue[m_LowerBound] = beh; m_LowerBound--; m_LowerUpdateQueueBound = settings.UpdateOrder; } //It's somewhere inbetween or where we can't place legally. Mark it for sorting. else { queue[m_UpperBound] = beh; m_UpperBound++; NeedsSorting = true; } if (!HasEntries) { m_LowerUpdateQueueBound = m_UpperUpdateQueueBound; m_HasEntries = true; } }
public override void WriteLoopSettings(CoreMonoBeh beh, LoopUpdateSettings set) { beh.UM_SETTINGS_GAMEPLAYUPDATE = set; }
public sealed override void WriteLoopSettings(CoreMonoBeh beh, LoopUpdateSettings set) { throw new Exception("A WorkerLoop abstract method has been called! You should not inherit from it!"); }
public override void CoreInitSetup() { UM_SETTINGS_UPDATE = new LoopUpdateSettings(33); }
public override void CoreInitSetup() { UM_SETTINGS_UPDATE = new LoopUpdateSettings(32, false, true); UM_SETTINGS_GAMEPLAYUPDATE = new LoopUpdateSettings(32, false, true); }
public abstract void WriteLoopSettings(CoreMonoBeh beh, LoopUpdateSettings set);