Esempio n. 1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            textField   = Content.Load <Texture2D>("saper");
            font        = Content.Load <SpriteFont>("font");
            minefield   = new MineField(10, 10, 10, 20, 30, 0);
            minefield.GenerateMineField(rand);


            // TODO: use this.Content to load your game content here
        }
Esempio n. 2
0
    public void StartGame()
    {
        mineField = FindObjectOfType <MineField>();
        timer     = FindObjectOfType <Timer>();

        firstClick = true;

        mineField.GenerateMineField(x, y, bombs);
        Counter.singleton.StartGame(x * y, bombs);
        if (!firstCheckSafe)
        {
            mineField.GenerateBombs();
        }
    }