87 lines
2.2 KiB
C#
87 lines
2.2 KiB
C#
|
|
using System;
|
|||
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
namespace Cielonos.Settings
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// Gameplay 相关设置:语言、相机、HUD 显示等。
|
|||
|
|
/// </summary>
|
|||
|
|
[Serializable]
|
|||
|
|
public class GameplaySettings
|
|||
|
|
{
|
|||
|
|
[SettingsIgnore]
|
|||
|
|
public string locale = "zh-CN";
|
|||
|
|
|
|||
|
|
[Range(10f, 100f)]
|
|||
|
|
public int cameraSensitivityX = 50;
|
|||
|
|
|
|||
|
|
[Range(10f, 100f)]
|
|||
|
|
public int cameraSensitivityY = 50;
|
|||
|
|
|
|||
|
|
public bool invertYAxis = false;
|
|||
|
|
public bool showHUD = true;
|
|||
|
|
public bool showDamageNumbers = true;
|
|||
|
|
public bool showFPS = false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 画面设置:分辨率、画质、帧率等。
|
|||
|
|
/// </summary>
|
|||
|
|
[Serializable]
|
|||
|
|
public class GraphicsSettings
|
|||
|
|
{
|
|||
|
|
/// <summary>分辨率宽度,0 表示使用当前原生分辨率。</summary>
|
|||
|
|
public int resolutionWidth = 0;
|
|||
|
|
|
|||
|
|
/// <summary>分辨率高度,0 表示使用当前原生分辨率。</summary>
|
|||
|
|
public int resolutionHeight = 0;
|
|||
|
|
|
|||
|
|
public FullScreenMode fullscreenMode = FullScreenMode.FullScreenWindow;
|
|||
|
|
|
|||
|
|
/// <summary>画质预设索引,-1 表示使用项目默认值。</summary>
|
|||
|
|
[Range(1, 4)]
|
|||
|
|
public int qualityLevel = 4;
|
|||
|
|
|
|||
|
|
public bool vSync = true;
|
|||
|
|
|
|||
|
|
[Range(10f, 240f)]
|
|||
|
|
public int targetFrameRate = 120;
|
|||
|
|
|
|||
|
|
[Range(10f, 100f)]
|
|||
|
|
public int brightness = 50;
|
|||
|
|
|
|||
|
|
public bool postProcessing = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 音频设置:各通道音量,映射到 Wwise RTPC。
|
|||
|
|
/// </summary>
|
|||
|
|
[Serializable]
|
|||
|
|
public class SoundSettings
|
|||
|
|
{
|
|||
|
|
[Range(0f, 100f)]
|
|||
|
|
public int masterVolume = 50;
|
|||
|
|
|
|||
|
|
[Range(0f, 100f)]
|
|||
|
|
public int musicVolume = 50;
|
|||
|
|
|
|||
|
|
[Range(0f, 100f)]
|
|||
|
|
public int sfxVolume = 50;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 操控设置:按键绑定覆盖数据。
|
|||
|
|
/// <para>
|
|||
|
|
/// <see cref="bindingOverridesJson"/> 存储
|
|||
|
|
/// <c>InputActionAsset.SaveBindingOverridesAsJson()</c> 的输出,
|
|||
|
|
/// 由 <c>PlayerInputSubcontroller</c> 在初始化时读取并应用。
|
|||
|
|
/// </para>
|
|||
|
|
/// </summary>
|
|||
|
|
[Serializable]
|
|||
|
|
public class ControlsSettings
|
|||
|
|
{
|
|||
|
|
[SettingsIgnore]
|
|||
|
|
public string bindingOverridesJson = "";
|
|||
|
|
}
|
|||
|
|
}
|