Energy Improvement 2.0

Actually it is needed to add one line “playButton.interactable = true;” as below for the button to be interactable after you minimize you app and wait more then “energyReady” time. Otherwise button will remain inactive but with full energy - untill reload.

if(DateTime.Now > energyReady)
            {
                playButton.interactable = true;
                energy = maxEnergy;
                PlayerPrefs.SetInt(EnergyKey, energy);
            }
2 Likes

thank you for this much needed addition.

1 Like

Privacy & Terms