add project files

This commit is contained in:
Boris Nikolaev
2026-08-14 01:58:31 +03:00
parent 9134cad79b
commit 5f1e94b653
4399 changed files with 12286903 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
using UnityEngine;
using UnityEngine.UI;
using OHM.UnityToolkit;
using UnityEngine.Serialization;
public class UISettings : UIMenu
{
[SerializeField]
private TextWrapper version;
[SerializeField]
private Toggle vibrationToggle;
[SerializeField]
private Toggle soundsToggle;
[SerializeField]
[FormerlySerializedAs("toggleSettings")]
private Toggle _toggleSettings;
public override void Show()
{
base.Show();
InitVibrate();
InitSounds();
if (version != null)
{
version.text = VersionUtils.GetVersionData().GetVersionLongName();
}
}
public void InitVibrate()
{
if (vibrationToggle != null)
{
vibrationToggle.isOn = AppSettings.Instance.VibrationsEnabled;
}
}
public void InitSounds()
{
if (soundsToggle != null)
{
soundsToggle.isOn = AppSettings.Instance.AudioEnabled;
}
}
public void ToggleVibrate(bool on)
{
AppSettings.Instance.VibrationsEnabled = on;
}
public void ToggleAudio(bool on)
{
AppSettings.Instance.AudioEnabled = on;
}
}