Exemple #1
0
            internal DisposablePause(Dictionary <ulong, NetworkVar> .ValueCollection vars, SyncedGameLogicComponent syncedGameLogic)
            {
                pausers = new NetworkVar.DisposablePause[vars.Count];
                int i = 0;

                foreach (var val in vars)
                {
                    pausers[i] = val.Pause();
                    i++;
                }

                _syncedGameLogic = syncedGameLogic;
            }
Exemple #2
0
 void IDisposable.Dispose()
 {
     if (pausers != null)
     {
         for (int i = 0; i < pausers.Length; i++)
         {
             pausers[i].Dispose();
         }
         pausers = null;
         _syncedGameLogic.ForceSync();
         _syncedGameLogic = null;
     }
 }
Exemple #3
0
 public VarCreatorWrapper(NetworkVarExtensions.IVariableCreator creator, Dictionary <ulong, byte[]> _raws, SyncedGameLogicComponent source)
 {
     _creator   = creator;
     this._raws = _raws;
     _source    = source;
 }