// Use this for initialization void Start() { // Get instances for the currency and upgrades managers. persistentCurrencyManager = PersistentCurrencyManager.instance; persistentUpgradesManager = PersistentUpgradesManager.instance; // Load the saved game state. SaveLoad.Load(); // Set the persistent currency text. SetPersistentCurrencyText(); }
// Use this for initialization void Start() { // Get references to buildable tiles. buildableTiles = FindObjectsOfType(typeof(BuildableTile)) as BuildableTile[]; // Update UI elements. uiCanvas.UpdateLivesText(playerLives); // Get a reference to the currency managers. persistentCurrencyManager = PersistentCurrencyManager.instance; // Get a reference to the audio manager. audioManager = FindObjectOfType <AudioManager>(); // Initialize session currency. sessionCurrencyManager.SetSessionCurrency(startingSessionCurrency); // Load the saved game state (useful for running the game directly through the main scene). SaveLoad.Load(); }