Added Audio mute /un mute button , Skip Start animation video button in setting Manager.

posted in: Weekly Progress | 0

using UnityEngine;
using System.Collections;

public class SettingsManager : MonoBehaviour
{
public static SettingsManager Instance {get; private set;}
public PlayerSetting Settings;

public struct PlayerSetting
{
public int IsAudioDisabled;
public int SkipStartAnimation;

public PlayerSetting(int isAudioDisabled , int isStartAnimationEnabled)
{
IsAudioDisabled = isAudioDisabled;
SkipStartAnimation = isStartAnimationEnabled;
}
}

void Start()
{
}

public void Awake()
{
Instance = this;
}

public void LoadSettings()
{
Settings.IsAudioDisabled = PlayerPreffManager.Instance.LoadInt(“AudioStatusDisabled”);
Settings.SkipStartAnimation = PlayerPreffManager.Instance.LoadInt(“StartAnimationStatus”);
}

public void SaveSettings()
{
PlayerPreffManager.Instance.SaveInt(“AudioStatusDisabled”, Settings.IsAudioDisabled);
PlayerPreffManager.Instance.SaveInt(“StartAnimationStatus”, Settings.SkipStartAnimation);
}
}

Leave a Reply