Game Manager - HealthStart-Monstralia/Monstralia GitHub Wiki

Basic Overview

  • Class: GameManager
  • Derivatives: Monobehaviour
  • Singleton, DontDestroyOnLoad

Purpose

  • To store and load game data while giving consistent global functionalities that all mini games can use.

Functions

  1. Set and retrieve current level for a minigame
  2. Set and retrieve current stars for a minigame
  3. Set and retrieve tutorial status for a minigame
  4. Set and retrieve the current island section
  5. Set and retrieve chosen monster.
  6. Set and retrieve visited island sections
  7. Create a countdown
  8. Unlock a sticker for the current minigame
  9. Create an end screen for the end of a game
  10. Interact with Review Game Manager for reviews

Data

  1. Levels for each game
  2. Stars for each game
  3. Stickers player has earned
  4. Stickers player has placed in the book
  5. Type of monster chosen by player
  6. Number of games completed
  7. Current island section
  8. Visited areas of the island

Notes

  • When referencing Game Manager through GameManager.Instance, try to not put this in a class's Awake function as GameManager.Instance may be null until it completes its awake function.