超大量的更新 修复很多问题,gameplay特效初步

This commit is contained in:
FloatGaming
2026-02-14 23:46:20 +08:00
parent ef8eb67259
commit 3a7a0b4669
360 changed files with 85670 additions and 4144 deletions
@@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using System.Collections;
@@ -8,7 +8,7 @@ public class SongButton : MonoBehaviour
{
[Header("thisSong_so")]
public ScriptableObject thisSong_so;
[Header("显示信息")]
[Header("Inspector")]
public Text songNameText;
public Text multiNameText;
public Text joinTime_and_dlcName_Text;
@@ -19,14 +19,14 @@ public class SongButton : MonoBehaviour
public Text songIDText;
public Image buttonImage;
public Image scoreLevelImage;
[Header("头像")]
[Header("Inspector")]
public Image profileImage;
public int song_songSerialID;
[Header("select mark")]
public Image selected_boarder;
public Image fade_image;
[Header("评分阈值")]
[Header("Inspector")]
public float easePercent = 1f;
public float ssPercent = 0.95f;
public float sPercent = 0.9f;
@@ -36,7 +36,7 @@ public class SongButton : MonoBehaviour
public float dPercent = 0.5f;
public float ePercent = 0.4f;
public float fPercent = 0.3f;
[Header("评级图")]
[Header("Inspector")]
public Sprite easeSprite;
public Sprite ssSprite;
public Sprite sSprite;
@@ -91,21 +91,21 @@ public class SongButton : MonoBehaviour
if (songNameText != null) songNameText.text = sd.songName;
if (multiNameText != null)
multiNameText.text = "作曲:" + sd.artistName + " | 画师:" + sd.painter + " | 制谱:" + sd.level_creator;
multiNameText.text = "Artist: " + sd.artistName + " | Illustrator: " + sd.painter + " | Charter: " + sd.level_creator;
if (joinTime_and_dlcName_Text != null)
{
string join = string.IsNullOrEmpty(sd.thisLevel_addDateString) ? "未知" : sd.thisLevel_addDateString;
string dlc = string.IsNullOrEmpty(sd.belongsTo_whichDLC) ? "未知DLC" : sd.belongsTo_whichDLC;
joinTime_and_dlcName_Text.text = "上线时间:" + join + " | " + "所属DLC" + dlc;
string join = string.IsNullOrEmpty(sd.thisLevel_addDateString) ? "Unknown" : sd.thisLevel_addDateString;
string dlc = string.IsNullOrEmpty(sd.belongsTo_whichDLC) ? "Unknown DLC" : sd.belongsTo_whichDLC;
joinTime_and_dlcName_Text.text = "Release: " + join + " | DLC: " + dlc;
}
if (songOverallDescriptionText != null)
{
songOverallDescriptionText.text = string.IsNullOrEmpty(sd.thisLevel_overallDescription) ? "关卡简介:" : sd.thisLevel_overallDescription;
songOverallDescriptionText.text = string.IsNullOrEmpty(sd.thisLevel_overallDescription) ? "" : sd.thisLevel_overallDescription;
}
// 使用 SongData 提供的统一方法获取全难度最高分及其对应的难度名称
// Documentation text normalized.
int bestTotal = 0;
int bestDiff = -1;
string bestDiffName = "";
@@ -115,7 +115,7 @@ public class SongButton : MonoBehaviour
if (highestScoreText != null) highestScoreText.text = bestTotal.ToString();
// 在指定位置展示该最高分所属的难度名称
// Documentation text normalized.
if (highestScoreDifficultyText != null)
{
highestScoreDifficultyText.text = string.IsNullOrEmpty(bestDiffName) ? "" : "(" + bestDiffName + ")";
@@ -127,7 +127,7 @@ public class SongButton : MonoBehaviour
Sprite chosenSprite = null;
float baseScore = 2000000f;
// 如果从来没玩过(总分为0),显示未完成图
// Documentation text normalized.
if (bestTotal <= 0)
{
chosenSprite = ufSprite;
@@ -198,7 +198,7 @@ public class SongButton : MonoBehaviour
}
song_songSerialID = songID;
if (songIDText != null) songIDText.text = "歌曲识别号:" + song_songSerialID.ToString();
if (songIDText != null) songIDText.text = "Song ID: " + song_songSerialID.ToString();
}
else
{
@@ -1,8 +1,8 @@
using System.Collections.Generic;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "SongList", menuName = "Music/SongList")]
public class SongList : ScriptableObject
{
public List<SongData> songs = new List<SongData>(); // 存储所有歌曲的数据
public List<SongData> songs = new List<SongData>(); // Documentation text normalized.
}
@@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
using UnityEngine.SceneManagement;
@@ -8,9 +8,9 @@ using DG.Tweening;
public class SongSelectUI : MonoBehaviour
{
public SongList songList; // 存储歌曲列表的 ScriptableObject
public GameObject songButtonPrefab; // 歌曲按钮的 Prefab (Button)
public Transform contentPanel; // 滚动视图的 Content 面板
public SongList songList; // Documentation text normalized.
public GameObject songButtonPrefab; // Documentation text normalized.
public Transform contentPanel; // Documentation text normalized.
[SerializeField] Button button_Main;
[SerializeField] string ui_Main_Scene_Name = "UI_UI";
@@ -42,6 +42,12 @@ public class SongSelectUI : MonoBehaviour
void Start()
{
// Defensive reset: prevent select-scene enter animations from freezing invisible.
if (Time.timeScale <= 0f)
{
Time.timeScale = 1f;
}
if (songList == null || songButtonPrefab == null || contentPanel == null)
{
Debug.LogError("请在 Inspector 中分配所有字段!");
@@ -73,7 +79,7 @@ public class SongSelectUI : MonoBehaviour
}
}
// 显示所有歌曲 (kept for manual use)
// Documentation text normalized.
public void DisplaySongs()
{
DisplaySongsFromList(songList != null ? songList.songs : null);
@@ -373,3 +379,4 @@ public class SongSelectUI : MonoBehaviour
// helper to avoid hardcoding scene name string in delegate - keeps serializer-friendly field
private string ui_Main_Scene_NAME() => ui_Main_Scene_Name;
}
@@ -1,11 +1,2 @@
fileFormatVersion: 2
guid: 476464d443256964eb8b3eeac58bfc2f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: