Beispiel #1
0
        public unsafe override void Initialize()
        {
            base.Initialize();

            GameEngine.firstClick = true;
            isLost = false;
            isWon = false;

            tiles = new Tile[(int)fieldSize.X][][];
            for (int i = 0; i < fieldSize.X; i++)
            {
                tiles[i] = new Tile[(int)fieldSize.Y][];
                for (int j = 0; j < fieldSize.Y; j++)
                {
                    tiles[i][j] = new Tile[1];
                    tiles[i][j][0] = new TileSquare(new Vector3(i * 16, j * 16, 0), new Vector3(16, 16, 0));
                }
            }
        }
Beispiel #2
0
        public unsafe override void Initialize()
        {
            base.Initialize();

            GameEngine.firstClick = true;
            isLost = false;
            isWon = false;

            tiles = new Tile[(int)fieldSize.X][][];
            for (int i = 0; i < fieldSize.X; i++)
            {
                tiles[i] = new Tile[(int)fieldSize.Y][];
                for (int j = 0; j < fieldSize.Y; j++)
                {
                    tiles[i][j] = new Tile[1];
                    tiles[i][j][0] = new TileSquare(new Vector3(i * 16, j * 16, 0), new Vector3(16, 16, 0));

                    if (Math.Pow(i - radius + .5, 2) + Math.Pow(j - radius + .5, 2) > radsqr)
                        tiles[i][j][0].CurrentState = -20;
                }
            }
        }