public void nextBlock() { Bounds topBlockBounds = _topBlock.Bounds; Bounds movingBounds = ProcessOverlap.CalculateAboveBounds(ref topBlockBounds); Vector3 start = spawnOffset() + movingBounds.center; Vector3 end = movingBounds.center - spawnOffset(); _movingBlock = factory.generatePingPongBlock(ref movingBounds, start, end); }
void GenerateInitialStack() { Bounds blockBounds = new Bounds(Vector3.zero, new Vector3(0.42f, 0.42f)); for (int i = 0; i < 5; ++i) { _topBlock = factory.generateStaticBlock(ref blockBounds); blockBounds = ProcessOverlap.CalculateAboveBounds(ref blockBounds); } }