超大量的更新 修复很多问题,gameplay特效初步
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class audioMerger : MonoBehaviour
|
||||
{
|
||||
[Header("sv object")]
|
||||
public GameObject sv_audioSettings;
|
||||
[Header("所有声音给我站一边")]
|
||||
[Tooltip("因为静音键我要出现")]
|
||||
[Header("Inspector")]
|
||||
[Tooltip("Documentation text normalized.")]
|
||||
public Toggle enableGlobalMute_toggle;
|
||||
[Header("一堆slider")]
|
||||
[Header("Inspector")]
|
||||
public Slider mainVolumn_slider;
|
||||
public Slider noteHit_slider;
|
||||
public Slider musicInGame_slider;
|
||||
@@ -16,7 +16,7 @@ public class audioMerger : MonoBehaviour
|
||||
public Slider skillEffect_slider;
|
||||
public Slider uiInteration_slider;
|
||||
public Slider cvVolumn_slider;
|
||||
[Header("配套的一堆text")]
|
||||
[Header("Inspector")]
|
||||
public Text mainVolumn_text;
|
||||
public Text noteHit_text;
|
||||
public Text musicInGame_text;
|
||||
@@ -45,7 +45,7 @@ public class audioMerger : MonoBehaviour
|
||||
|
||||
if (sv_audioSettings != null)
|
||||
{
|
||||
// 非模式:当 toggle 为开启 (isOn == true) 时,禁用 sv_audioSettings
|
||||
// Documentation text normalized.
|
||||
sv_audioSettings.SetActive(!isOn);
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public class audioMerger : MonoBehaviour
|
||||
PlayerPrefs.SetInt(PlayerPrefKey_EnableGlobalMute, isOn ? 1 : 0);
|
||||
PlayerPrefs.Save();
|
||||
|
||||
// 应用非模式:当 toggle 为开启时,禁用 sv_audioSettings
|
||||
// Documentation text normalized.
|
||||
if (sv_audioSettings != null)
|
||||
{
|
||||
sv_audioSettings.SetActive(!isOn);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
@@ -7,7 +7,7 @@ using UnityEngine.EventSystems;
|
||||
|
||||
public class controllerSettings : MonoBehaviour
|
||||
{
|
||||
[Header("按键绑定")]
|
||||
[Header("Inspector")]
|
||||
public Button[] keyButtons; // assign 5 buttons in Inspector
|
||||
public Text errorText; // UI text to show error/success messages
|
||||
[Header("Message Colors")]
|
||||
@@ -15,7 +15,7 @@ public class controllerSettings : MonoBehaviour
|
||||
public Color messageSuccessColor = Color.green;
|
||||
private Coroutine messageCoroutine = null;
|
||||
|
||||
[Header("音符流动速度滑动变阻器")]
|
||||
[Header("Inspector")]
|
||||
public Slider noteSpeedMultipler_slider;
|
||||
public Text noteSpeedMultipler_valueText;
|
||||
public Button noteSpeed_DecreaseButton;
|
||||
@@ -194,7 +194,7 @@ public class controllerSettings : MonoBehaviour
|
||||
// start blinking underscore on the clicked button
|
||||
blinkCoroutine = StartCoroutine(BlinkUnderscore(index));
|
||||
// show persistent prompt
|
||||
ShowPersistentMessage("按下新按键", messageErrorColor);
|
||||
ShowPersistentMessage("按下新按键", messageErrorColor);
|
||||
}
|
||||
|
||||
private IEnumerator BlinkUnderscore(int index)
|
||||
@@ -229,7 +229,7 @@ public class controllerSettings : MonoBehaviour
|
||||
if (existing == key)
|
||||
{
|
||||
// conflict: reject and keep waiting
|
||||
string msg = $"按键冲突:{KeyBindingManager.GetDisplayName(key)}已被分配给按键{i+1}。";
|
||||
string msg = $"按键冲突:{KeyBindingManager.GetDisplayName(key)}已被分配给按键{i+1}。";
|
||||
ShowMessage(msg, messageErrorColor, 2f);
|
||||
StartCoroutine(FlashButtonInvalid(rebindingIndex));
|
||||
return;
|
||||
@@ -244,7 +244,7 @@ public class controllerSettings : MonoBehaviour
|
||||
|
||||
// clear persistent prompt and show success message
|
||||
ClearMessage();
|
||||
ShowMessage("按键设置已保存", messageSuccessColor, 2f);
|
||||
ShowMessage("按键设置已保存", messageSuccessColor, 2f);
|
||||
|
||||
// finish
|
||||
previousKeyValid = false;
|
||||
@@ -316,7 +316,7 @@ public class controllerSettings : MonoBehaviour
|
||||
KeyBindingManager.ChangeKeyBinding(colors[rebindingIndex], previousKey);
|
||||
InputManager.Instance?.RefreshKeyLabels();
|
||||
ClearMessage();
|
||||
ShowMessage("按键设置已保存", messageSuccessColor, 2f);
|
||||
ShowMessage("按键设置已保存", messageSuccessColor, 2f);
|
||||
}
|
||||
previousKeyValid = false;
|
||||
previousKey = KeyCode.None;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
@@ -66,7 +66,7 @@ public class graphicSettings : MonoBehaviour
|
||||
{
|
||||
if (resolution_Dropdown == null) return;
|
||||
if (tempFreeResOptionIndex >= 0) return;
|
||||
var opt = new Dropdown.OptionData("���ɷֱ���");
|
||||
var opt = new Dropdown.OptionData("自定义分辨率");
|
||||
resolution_Dropdown.options.Add(opt);
|
||||
tempFreeResOptionIndex = resolution_Dropdown.options.Count - 1;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public class graphicSettings : MonoBehaviour
|
||||
{
|
||||
if (screenMode_Dropdown == null) return;
|
||||
|
||||
var options = new List<string>() { "����(���ɴ���)", "ȫ��(����Ӧ)", "�ޱ߿�" };
|
||||
var options = new List<string>() { "窗口化(可调整大小)", "全屏(独占模式)", "无边框窗口" };
|
||||
screenMode_Dropdown.ClearOptions();
|
||||
screenMode_Dropdown.AddOptions(options);
|
||||
|
||||
@@ -271,7 +271,7 @@ public class graphicSettings : MonoBehaviour
|
||||
|
||||
foreach (var r in availableResolutions)
|
||||
{
|
||||
options.Add($"{r.x} �� {r.y}");
|
||||
options.Add($"{r.x} x {r.y}");
|
||||
}
|
||||
|
||||
resolution_Dropdown.ClearOptions();
|
||||
@@ -303,7 +303,7 @@ public class graphicSettings : MonoBehaviour
|
||||
{
|
||||
Screen.SetResolution(cw, ch, Screen.fullScreenMode, Screen.currentResolution.refreshRateRatio);
|
||||
EnsureTempFreeOptionExists();
|
||||
resolution_Dropdown.options[tempFreeResOptionIndex].text = $"{cw} �� {ch}";
|
||||
resolution_Dropdown.options[tempFreeResOptionIndex].text = $"{cw} x {ch}";
|
||||
resolution_Dropdown.SetValueWithoutNotify(tempFreeResOptionIndex);
|
||||
}
|
||||
else
|
||||
@@ -336,7 +336,7 @@ public class graphicSettings : MonoBehaviour
|
||||
else
|
||||
{
|
||||
EnsureTempFreeOptionExists();
|
||||
resolution_Dropdown.options[tempFreeResOptionIndex].text = $"{Screen.width} �� {Screen.height}";
|
||||
resolution_Dropdown.options[tempFreeResOptionIndex].text = $"{Screen.width} x {Screen.height}";
|
||||
resolution_Dropdown.SetValueWithoutNotify(tempFreeResOptionIndex);
|
||||
}
|
||||
}
|
||||
@@ -372,7 +372,7 @@ public class graphicSettings : MonoBehaviour
|
||||
{
|
||||
if (frameRate_Dropdown == null) return;
|
||||
|
||||
var fpsOptions = new List<string>() { "24", "30", "60", "90", "120", "144", "165", "210", "240", "300", "������", "��ֱͬ��" };
|
||||
var fpsOptions = new List<string>() { "24", "30", "60", "90", "120", "144", "165", "210", "240", "300", "无限制", "垂直同步" };
|
||||
frameRate_Dropdown.ClearOptions();
|
||||
frameRate_Dropdown.AddOptions(fpsOptions);
|
||||
|
||||
@@ -432,13 +432,13 @@ public class graphicSettings : MonoBehaviour
|
||||
}
|
||||
else if (index == fpsValues.Length)
|
||||
{
|
||||
// ������
|
||||
// Documentation text normalized.
|
||||
QualitySettings.vSyncCount = 0;
|
||||
Application.targetFrameRate = -1; // unlimited / platform default
|
||||
}
|
||||
else if (index == fpsValues.Length + 1)
|
||||
{
|
||||
// ��ֱͬ��
|
||||
// Documentation text normalized.
|
||||
QualitySettings.vSyncCount = 1; // enable vsync
|
||||
Application.targetFrameRate = -1;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
@@ -45,13 +45,13 @@ public class readDeviceInfo : MonoBehaviour
|
||||
|
||||
private void read_deviceInfo()
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
void AddEntry(string title, object value)
|
||||
{
|
||||
string str;
|
||||
if (value == null) str = "";
|
||||
else if (value is bool b) str = b ? "����" : "����";
|
||||
else if (value is bool b) str = b ? "是" : "否";
|
||||
else str = value.ToString();
|
||||
|
||||
sb.AppendLine($"<b>{title}</b>");
|
||||
@@ -59,47 +59,47 @@ public class readDeviceInfo : MonoBehaviour
|
||||
sb.AppendLine();
|
||||
}
|
||||
|
||||
AddEntry("ƽ̨", Application.platform.ToString());
|
||||
AddEntry("����Ŀ¼", Application.dataPath);
|
||||
AddEntry("persistent ����·��", Application.persistentDataPath);
|
||||
AddEntry("平台", Application.platform.ToString());
|
||||
AddEntry("数据目录", Application.dataPath);
|
||||
AddEntry("persistent 数据路径", Application.persistentDataPath);
|
||||
|
||||
AddEntry("����ϵͳ", SystemInfo.operatingSystem);
|
||||
AddEntry("�豸����", SystemInfo.deviceName);
|
||||
AddEntry("�豸�ͺ�", SystemInfo.deviceModel);
|
||||
AddEntry("�豸ΨһID", SystemInfo.deviceUniqueIdentifier);
|
||||
AddEntry("操作系统", SystemInfo.operatingSystem);
|
||||
AddEntry("设备名称", SystemInfo.deviceName);
|
||||
AddEntry("设备型号", SystemInfo.deviceModel);
|
||||
AddEntry("设备唯一ID", SystemInfo.deviceUniqueIdentifier);
|
||||
|
||||
AddEntry("CPU", SystemInfo.processorType);
|
||||
AddEntry("CPU������", SystemInfo.processorCount);
|
||||
AddEntry("ϵͳ�ڴ� (MB)", SystemInfo.systemMemorySize);
|
||||
AddEntry("CPU核心数", SystemInfo.processorCount);
|
||||
AddEntry("系统内存 (MB)", SystemInfo.systemMemorySize);
|
||||
|
||||
AddEntry("ͼ���豸����", SystemInfo.graphicsDeviceName);
|
||||
AddEntry("ͼ���豸��Ӧ��", SystemInfo.graphicsDeviceVendor);
|
||||
AddEntry("图形设备名称", SystemInfo.graphicsDeviceName);
|
||||
AddEntry("图形设备供应商", SystemInfo.graphicsDeviceVendor);
|
||||
AddEntry("DirectX", SystemInfo.graphicsDeviceType.ToString());
|
||||
AddEntry("�Դ� (MB)", SystemInfo.graphicsMemorySize);
|
||||
AddEntry("显存 (MB)", SystemInfo.graphicsMemorySize);
|
||||
|
||||
AddEntry("��Ļ�ֱ���", $"{Screen.currentResolution.width} x {Screen.currentResolution.height} @ {Screen.currentResolution.refreshRateRatio.value:0.##}Hz");
|
||||
AddEntry("��ĻDPI", Screen.dpi);
|
||||
AddEntry("��ʾģʽ", Screen.fullScreenMode.ToString());
|
||||
AddEntry("屏幕分辨率", $"{Screen.currentResolution.width} x {Screen.currentResolution.height} @ {Screen.currentResolution.refreshRateRatio.value:0.##}Hz");
|
||||
AddEntry("屏幕DPI", Screen.dpi);
|
||||
AddEntry("显示模式", Screen.fullScreenMode.ToString());
|
||||
|
||||
try
|
||||
{
|
||||
AddEntry("��ص���", $"{SystemInfo.batteryLevel * 100:F0}%");
|
||||
AddEntry("Battery Level", $"{SystemInfo.batteryLevel * 100:F0}%");
|
||||
}
|
||||
catch
|
||||
{
|
||||
AddEntry("���״̬", "��֧��");
|
||||
AddEntry("Battery Status", "Not Supported");
|
||||
}
|
||||
|
||||
AddEntry("�����������������༭��", "v1.1h02e");
|
||||
AddEntry("����������С��Ϸ����", "v1.301");
|
||||
AddEntry("����Ϸ�汾��", "code::testingVersion1062");
|
||||
AddEntry("��¼����", "Steam Client");
|
||||
AddEntry("主程序版本", "v1.1h02e");
|
||||
AddEntry("内置小游戏版本", "v1.301");
|
||||
AddEntry("游戏代码版本", "code::testingVersion1062");
|
||||
AddEntry("登录渠道", "Steam Client");
|
||||
|
||||
AddEntry(".NET Framework", "8.0 +");
|
||||
AddEntry("��������ߴ�", SystemInfo.maxTextureSize);
|
||||
AddEntry("Max Texture Size", SystemInfo.maxTextureSize);
|
||||
|
||||
AddEntry("���ú�̨����", Application.runInBackground);
|
||||
AddEntry("���߳���Ⱦ", SystemInfo.graphicsMultiThreaded);
|
||||
AddEntry("启用后台运行", Application.runInBackground);
|
||||
AddEntry("启用多线程渲染", SystemInfo.graphicsMultiThreaded);
|
||||
|
||||
string output = sb.ToString();
|
||||
|
||||
@@ -138,7 +138,7 @@ public class readDeviceInfo : MonoBehaviour
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
string desktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
string path = UnityEditor.EditorUtility.SaveFilePanel("�����豸��Ϣ", desktop, "device_info", "txt");
|
||||
string path = UnityEditor.EditorUtility.SaveFilePanel("保存设备信息", desktop, "device_info", "txt");
|
||||
return string.IsNullOrEmpty(path) ? null : path;
|
||||
#elif UNITY_STANDALONE_WIN
|
||||
try
|
||||
@@ -152,7 +152,7 @@ public class readDeviceInfo : MonoBehaviour
|
||||
ofn.fileTitle = new string('\0', 260);
|
||||
ofn.maxFileTitle = ofn.fileTitle.Length;
|
||||
ofn.initialDir = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
ofn.title = "�����豸��Ϣ";
|
||||
ofn.title = "保存设备信息";
|
||||
ofn.defExt = "txt";
|
||||
ofn.flags = OpenFileNameFlags.OFN_OVERWRITEPROMPT;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.EventSystems;
|
||||
using System.Collections;
|
||||
@@ -10,45 +10,53 @@ public class selectSettingsOptions : MonoBehaviour
|
||||
public Button escButton;
|
||||
public GameObject selfGO;
|
||||
|
||||
[Header("用户")]
|
||||
[Header("Inspector")]
|
||||
public Button userSettingsButton;
|
||||
public GameObject userSettingsGameObject;
|
||||
public Image userSettings_selectedMark;
|
||||
|
||||
[Header("画面设置")]
|
||||
[Header("Inspector")]
|
||||
public Button graphicSettingsButton;
|
||||
public GameObject graphicSettingsGameObject;
|
||||
public Image graphicSettings_selectedMark;
|
||||
|
||||
[Header("声音设置")]
|
||||
[Header("Inspector")]
|
||||
public Button audioSettingsButton;
|
||||
public GameObject audioSettingsGameObject;
|
||||
public Image audioSettings_selectedMark;
|
||||
|
||||
[Header("操作设置")]
|
||||
[Header("Inspector")]
|
||||
public Button controlSettingsButton;
|
||||
public GameObject controlSettingsGameObject;
|
||||
public Image controlSettings_selectedMark;
|
||||
|
||||
[Header("游戏设置")]
|
||||
[Header("Inspector")]
|
||||
public Button gameSettingsButton;
|
||||
public GameObject gameSettingsGameObject;
|
||||
public Image gameSettings_selectedMark;
|
||||
|
||||
[Header("关于")]
|
||||
[Header("Inspector")]
|
||||
public Button aboutUsButton;
|
||||
public GameObject aboutUsGameObject;
|
||||
public Image aboutUs_selectedMark;
|
||||
|
||||
[Header("设备信息")]
|
||||
[Header("Inspector")]
|
||||
public Button deviceInfoButton;
|
||||
public GameObject deviceInfoGameObject;
|
||||
public Image deviceInfo_selectedMark;
|
||||
|
||||
[Header("Fade Settings")]
|
||||
[Tooltip("时间(秒)")] public float fadeDuration = 0.25f;
|
||||
[Tooltip("Hover alpha when mouse over (0-1)")] public float hoverAlpha = 0.75f;
|
||||
[Tooltip("Alpha when selected (常亮)")] public float selectedAlpha = 1f;
|
||||
[Tooltip("Hover alpha when mouse over (0-1).")]
|
||||
[Range(0f, 1f)]
|
||||
public float hoverAlpha = 0.75f;
|
||||
|
||||
[Tooltip("Selected mark alpha when option is selected (0-1).")]
|
||||
[Range(0f, 1f)]
|
||||
public float selectedAlpha = 1f;
|
||||
|
||||
[Tooltip("Fade duration in seconds.")]
|
||||
[Min(0f)]
|
||||
public float fadeDuration = 0.1f;
|
||||
|
||||
// internal state
|
||||
private class OptionEntry
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class userSettings : MonoBehaviour
|
||||
{
|
||||
[Header("登陆渠道")]
|
||||
[Tooltip("渠道")]
|
||||
[Header("Inspector")]
|
||||
[Tooltip("Documentation text normalized.")]
|
||||
public Text user_login_source_text;
|
||||
[Tooltip("渠道ID")]
|
||||
[Tooltip("Documentation text normalized.")]
|
||||
public Text user_source_uid_text;
|
||||
|
||||
[Header("语言设置")]
|
||||
[Tooltip("当前语言")]
|
||||
[Header("Inspector")]
|
||||
[Tooltip("Documentation text normalized.")]
|
||||
public Dropdown language_dropdown;
|
||||
|
||||
[Header("存档管理")]
|
||||
[Tooltip("导出存档")]
|
||||
[Header("Inspector")]
|
||||
[Tooltip("Documentation text normalized.")]
|
||||
public Button export_saveData_button;
|
||||
[Tooltip("导入存档")]
|
||||
[Tooltip("Documentation text normalized.")]
|
||||
public Button import_saveData_button;
|
||||
[Tooltip("清理存档")]
|
||||
[Tooltip("Documentation text normalized.")]
|
||||
public Button clearup_saveData_button;
|
||||
|
||||
[Header("查看详细高光")]
|
||||
[Tooltip("查看按钮")]
|
||||
[Header("Inspector")]
|
||||
[Tooltip("Documentation text normalized.")]
|
||||
public Button view_detailedHighlight_button;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
|
||||
Reference in New Issue
Block a user