I recently added energy for my game and tried adapting it so it suits it best. The energy script is in the Menu scene and i have something like this to trigger it : i am using 2 PlayerPrefs lets say A and B. B goes up by one if deaths == 5 in the level scene. If A< B UseEnergy() and then A ++. But this only triggers if you go back to the MENU. But i dont want that. I want it to trigger in the level scene as else it is unbalanced. Can anybody help me?
↧