public void AddFixedUpdatable(IFixedUpdatable updatable) { if (!fixedList.Contains(updatable)) { fixedList.Add(updatable); } }
public void RemoveFixedUpdatable(IFixedUpdatable updatable) { if (fixedList.Contains(updatable)) { fixedList.Remove(updatable); } }
/// <summary> /// Disable <see cref="IFixedUpdatable"/> fixed updates /// </summary> /// <param name="updatable">Updatable to disable</param> public static void RemoveFixedUpdatable(IFixedUpdatable updatable) { if (IsRunning) { Instance.fixedUpdatables.RemoveSwapBack(updatable); } }
public void Remove(IFixedUpdatable client) { if (_fixedUpdates.Contains(client)) { _fixedUpdates.Remove(client); } }
/// <summary> /// Enable <see cref="IFixedUpdatable"/> fixed updates /// </summary> /// <param name="updatable">Updatable to enable</param> public static void AddFixedUpdatable(IFixedUpdatable updatable) { if (IsRunning) { Instance.fixedUpdatables.AddUnique(updatable); } }
public void Add(IFixedUpdatable client) { if (!_fixedUpdates.Contains(client)) { _fixedUpdates.Add(client); } }
public void RemoveFixedUpdatable(IFixedUpdatable updatable) { if (updatable == null) { return; } mFixedUpdatables.Remove(updatable); }
public void AddFixedUpdatable(IFixedUpdatable updatable) { if (updatable == null) { return; } mFixedUpdatables.Union(updatable); }
/// <summary> /// 削除します /// </summary> public static void Remove(IFixedUpdatable obj) { if (m_isQuit) { return; } Initialize(); m_list.Remove(obj); }
void Awake() { #if SERVER Debug.Log("Creating server"); serverOrclient = new Server(GameVersion, ServerPort); #else Debug.Log("Creating client"); serverOrclient = new Client(GameVersion); #endif }
protected void Initialize(IExitable state) { _exitState = state; _updatable = state as IUpdatable; _fixedUpdatable = state as IFixedUpdatable; }
/// <summary> /// Отменить регистрацию фиксированно обновляемого объекта /// </summary> /// <param name="parFixedUpdatableObject">Целевой фиксированно обновляемый объект</param> public void UnregisterFixedUpdatableObject(IFixedUpdatable parFixedUpdatableObject) { _fixedUpdatableObjects.Remove(parFixedUpdatableObject); }
/// <summary> /// Зарегистрировать новый фиксированно обновляемый объект /// </summary> /// <param name="parFixedUpdatableObject">Фиксированно обновляемый объект для регистрации</param> public void RegisterFixedUpdatableObject(IFixedUpdatable parFixedUpdatableObject) { _fixedUpdatableObjects.Add(parFixedUpdatableObject); }
/// <summary> /// Invokes <see cref="TimeManager.RemoveFixedUpdatable(IFixedUpdatable)"/> /// </summary> /// <param name="updatable"></param> public static void DisableFixedUpdates(this IFixedUpdatable updatable) { TimeManager.RemoveFixedUpdatable(updatable); }
/// <summary> /// Invokes <see cref="TimeManager.AddFixedUpdatable(IFixedUpdatable)"/> /// </summary> /// <param name="updatable"></param> public static void EnableFixedUpdates(this IFixedUpdatable updatable) { TimeManager.AddFixedUpdatable(updatable); }