コード例 #1
0
ファイル: Grid.cs プロジェクト: pascalaldo/5ES03
 public Block addBlock(Block b)
 {
     if (b.create())
         return null;
     blocks.Add(b);
     return b;
 }
コード例 #2
0
ファイル: Grid.cs プロジェクト: pascalaldo/5ES03
        private void updateGround()
        {
            Block tempBlock = new Block(this);
            Vector3[] nullCubes = new Vector3[]{new Vector3(0, 0, 0)};

            for (int z = 0; z < this.width; z++)
            {
                for (int x = 0; x < this.width; x++)
                {
                    while (tempBlock.checkCollision(nullCubes, new Vector3(x, ground[z, x], z)))
                    {
                        ground[z, x]++;
                        Console.WriteLine(ground[z, x]);
                    }
                }
            }
        }