示例#1
0
 public RecyclablePart(Part part, IRecycler recycler)
 {
     Recycler  = recycler;
     this.part = part;
     children  = new ChildPartsRegistry(this);
     this.part.children.ForEach(p => children.Add(p));
 }
示例#2
0
 public RecyclerWindow(IRecycler recycler) : base(Globals.Instance.AssetBundle)
 {
     this.recycler = recycler;
     root_parts    = new PartsRegistry(recycler);
     GameEvents.onVesselWasModified.Add(onVesselModified);
     GameEvents.onVesselCrewWasModified.Add(onRecyclerCrewModified);
 }
        private void Init(IRecycler <ReplayFrame> replayFrameRecycler)
        {
            replayFile = GameSession.CurrentParameter.ReplayFile;

            replayReader = new DataStreamReader <ReplayFrame>(
                replayFrameRecycler.GetNext,
                60 * 5,
                readInterval: 100
                );

            GameSession.OnSoftInit    += OnSoftInit;
            GameSession.OnSoftDispose += OnSoftDispose;
        }
        public EventQueue([NotNull] ReadonlyLockedValue <Pool <byte[]> > byteArrayPool, [NotNull] IRecycler <List <RemoteChannel> > channelsListPool)
        {
            if (byteArrayPool == null)
            {
                throw new ArgumentNullException("byteArrayPool");
            }
            if (channelsListPool == null)
            {
                throw new ArgumentNullException("channelsListPool");
            }

            _byteArrayPool    = byteArrayPool;
            _channelsListPool = channelsListPool;
        }
示例#5
0
 public PartsRegistry(IRecycler recycler)
 {
     this.recycler = recycler;
 }
 public void DiagnoseTest(string messRecyclege, IRecycler pool)
 {
     Console.WriteLine(" > " + messRecyclege);
     Console.WriteLine("      Pool contRecycleins {0} items, {1} in use, {2} RecyclevRecycleilRecycleble.", pool.Count, pool.InUseCount, pool.AvailableCount);
 }
示例#7
0
 public ReplayFrame(IRecycler <ReplayableInput> replayInputRecycler, IRecycler <ReplayableJudgement> replayJudgementRecycler)
 {
     this.replayInputRecycler     = replayInputRecycler;
     this.replayJudgementRecycler = replayJudgementRecycler;
 }