Esempio n. 1
0
        protected IEnumerator WorldUpdateCoroutine()
        {
            while (true)
            {
                BlockGroup[] allBG_curr = new BlockGroup[allBlockGroups.Count];
                allBlockGroups.CopyTo(allBG_curr);

                foreach (var bg in allBG_curr)
                {
                    bg.budgetMS = UpdateCoroutineBudgetMS;
                    bg.StartWorldUpdateSingleLoop();

                    while (!bg.UpdateLoopFinished)
                    {
                        yield return(null);
                    }
                }

                yield return(null);
            }
        }
Esempio n. 2
0
 public bool Contains(BlockGroup bg)
 {
     return(allBlockGroups.Contains(bg));
 }
Esempio n. 3
0
 public BlockEntityBase(BlockGroup group, Vector3Int pos, Block block)
 {
     this.group = group;
     this.pos   = pos;
     this.block = block;
 }