public void muteMusic() { if (completionKeeper.gameObject.GetComponent <AudioSource>().mute == true) { completionKeeper.gameObject.GetComponent <AudioSource>().mute = false; completionKeeper.mutedMusic = false; } else { completionKeeper.gameObject.GetComponent <AudioSource>().mute = true; completionKeeper.mutedMusic = true; } completionKeeper.BackupDataToPlayerPrefs(); }
public void ToggleLasers() { if (completionKeeper.toggleLasers == true) { completionKeeper.toggleLasers = false; foreach (GameObject turret in gameObject.GetComponent <TurretManager>().turretList) { turret.GetComponent <TurretShooter>().isTargettingLaserOn = false; } } else { completionKeeper.toggleLasers = true; foreach (GameObject turret in gameObject.GetComponent <TurretManager>().turretList) { turret.GetComponent <TurretShooter>().isTargettingLaserOn = true; } } completionKeeper.BackupDataToPlayerPrefs(); }