public void SwitchState() { active = !active; if (active) { LoadFromPlayerPrefs(); hud.Deactivate(); } else { hud.Activate(); } }