Exemplo n.º 1
0
 public void AddFixedUpdatable(IFixedUpdatable updatable)
 {
     if (!fixedList.Contains(updatable))
     {
         fixedList.Add(updatable);
     }
 }
Exemplo n.º 2
0
 public void RemoveFixedUpdatable(IFixedUpdatable updatable)
 {
     if (fixedList.Contains(updatable))
     {
         fixedList.Remove(updatable);
     }
 }
Exemplo n.º 3
0
 /// <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);
     }
 }
Exemplo n.º 4
0
 public void Remove(IFixedUpdatable client)
 {
     if (_fixedUpdates.Contains(client))
     {
         _fixedUpdates.Remove(client);
     }
 }
Exemplo n.º 5
0
 /// <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);
     }
 }
Exemplo n.º 6
0
 public void Add(IFixedUpdatable client)
 {
     if (!_fixedUpdates.Contains(client))
     {
         _fixedUpdates.Add(client);
     }
 }
Exemplo n.º 7
0
 public void RemoveFixedUpdatable(IFixedUpdatable updatable)
 {
     if (updatable == null)
     {
         return;
     }
     mFixedUpdatables.Remove(updatable);
 }
Exemplo n.º 8
0
 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);
 }
Exemplo n.º 10
0
    void Awake()
    {
#if SERVER
        Debug.Log("Creating server");
        serverOrclient = new Server(GameVersion, ServerPort);
#else
        Debug.Log("Creating client");
        serverOrclient = new Client(GameVersion);
#endif
    }
Exemplo n.º 11
0
 protected void Initialize(IExitable state)
 {
     _exitState      = state;
     _updatable      = state as IUpdatable;
     _fixedUpdatable = state as IFixedUpdatable;
 }
Exemplo n.º 12
0
 /// <summary>
 /// Отменить регистрацию фиксированно обновляемого объекта
 /// </summary>
 /// <param name="parFixedUpdatableObject">Целевой фиксированно обновляемый объект</param>
 public void UnregisterFixedUpdatableObject(IFixedUpdatable parFixedUpdatableObject)
 {
     _fixedUpdatableObjects.Remove(parFixedUpdatableObject);
 }
Exemplo n.º 13
0
 /// <summary>
 /// Зарегистрировать новый фиксированно обновляемый объект
 /// </summary>
 /// <param name="parFixedUpdatableObject">Фиксированно обновляемый объект для регистрации</param>
 public void RegisterFixedUpdatableObject(IFixedUpdatable parFixedUpdatableObject)
 {
     _fixedUpdatableObjects.Add(parFixedUpdatableObject);
 }
Exemplo n.º 14
0
 /// <summary>
 /// Invokes <see cref="TimeManager.RemoveFixedUpdatable(IFixedUpdatable)"/>
 /// </summary>
 /// <param name="updatable"></param>
 public static void DisableFixedUpdates(this IFixedUpdatable updatable)
 {
     TimeManager.RemoveFixedUpdatable(updatable);
 }
Exemplo n.º 15
0
 /// <summary>
 /// Invokes <see cref="TimeManager.AddFixedUpdatable(IFixedUpdatable)"/>
 /// </summary>
 /// <param name="updatable"></param>
 public static void EnableFixedUpdates(this IFixedUpdatable updatable)
 {
     TimeManager.AddFixedUpdatable(updatable);
 }