Creating MineField In Unity (Part 2)

Recently I made a simple MineSweeper-style game. Here’s how I made the Game Manager.

Today’s Objective: Create the GameManager class which will handle all the game data not handled by a specific cell instance.

The Code:

First is to add some variables that I will need:

Also, the difficulty Enum system:

Now for the startup functions of the Manager:

The difficulty management functions:

The generation functions:

The gameplay functions:

That was a heap of code, but now I have a complete and nice game (excluding some miscellaneous game functions, like quitting)!

But after those are added and the game scene created, I’ve ended up with:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vincent Taylor

Vincent Taylor

153 Followers

Unity game developer / C# Programmer / Gamer. Australian (Tasmanian) indie games developer for 10+ years. Currently looking for games industry employment.