示例#1
0
        void Step()
        {
            state = new CellState[height, width];
            int birdX = bird.getX();
            int birdY = bird.getY();

            state[birdY, birdX] = CellState.Bird;
            foreach (var wall in walls)
            {
                int[] wallArray = wall.getWall();
                for (int y = 0; y < wallArray.Length; y++)
                {
                    if (wallArray[y] == 0)
                    {
                        state[y, wall.getCurrentX()] = CellState.Pillar;
                    }
                }
            }
            CheckCollision();
        }