This repository has been archived on 2023-09-13. You can view files and clone it, but cannot push or open issues or pull requests.
station_obscurum_unity/Assets/Scripts/SerializedObjects/GameSettings.cs

25 lines
772 B
C#
Raw Permalink Normal View History

2023-06-02 06:30:58 +02:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
namespace Scriptable
{
[CreateAssetMenu(fileName = "GameSettings", menuName = "ScriptableObjects/GameSetting", order = 1)]
public class GameSettings : ScriptableObject
{
private float sensitivity;
private float volume;
public float Sensitivity { get { return this.sensitivity; } set {
OnValueChange.Invoke(SettingModification.Sensitivity,sensitivity);
} }
public float Volume { get { return this.volume; } set
{
OnValueChange.Invoke(SettingModification.Volume,volume);
} }
public enum SettingModification { Sensitivity, Volume};
public UnityEvent<SettingModification,float> OnValueChange;
}
}