加入测试样例,初步完善队列信息——视图转换
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Collections;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
+9
-1
@@ -15,7 +15,7 @@ public class Character
|
||||
/// <summary>
|
||||
/// 突破等级
|
||||
/// </summary>
|
||||
public int boundaryLevel{get; set;}
|
||||
public string boundaryLevel{get; set;}
|
||||
/// <summary>
|
||||
/// 技能名称
|
||||
/// </summary>
|
||||
@@ -24,4 +24,12 @@ public class Character
|
||||
/// 是否为队长
|
||||
/// </summary>
|
||||
public bool isLeader{get; set;}
|
||||
|
||||
public Character(string name, string occupation, string boundaryLevel, string skillName)
|
||||
{
|
||||
this.name = name;
|
||||
this.occupation = occupation;
|
||||
this.boundaryLevel = boundaryLevel;
|
||||
this.SkillName = skillName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class CharacterCardView : MonoBehaviour
|
||||
{
|
||||
public GameObject charactCard;
|
||||
public Image characterImage;
|
||||
public Image levelIcon;
|
||||
public Image occupationIcon;
|
||||
public string characterName;
|
||||
|
||||
void Start()
|
||||
{
|
||||
charactCard=gameObject;
|
||||
characterImage.sprite = null;
|
||||
levelIcon.sprite = null;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据角色名称获取角色介绍信息
|
||||
/// </summary>
|
||||
void checkCharacterInformation()
|
||||
{
|
||||
Debug.Log("尝试获取角色介绍:"+characterName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 31ac798fff192ba4b92574fbc38f7d35
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+31
-1
@@ -8,9 +8,15 @@ public class TeamManager : MonoBehaviour
|
||||
public static TeamManager Instance {get; private set;}
|
||||
|
||||
public teamSettingPanel teamSettingPanelInstance;
|
||||
//当前玩家存档下的所有编队配置
|
||||
/// <summary>
|
||||
/// 当前玩家存档下的所有编队配置
|
||||
/// </summary>
|
||||
public Dictionary<int, List<Character>> currentTeamSettings = new Dictionary<int, List<Character>>();
|
||||
/// <summary>
|
||||
/// 玩家存档下已经解锁的角色信息列表
|
||||
/// </summary>
|
||||
public List<Character> SelectableCharacterList = new List<Character>();
|
||||
/// <summary>
|
||||
/// 根据此字段来在编队信息页显示已有编队
|
||||
/// </summary>
|
||||
public int currentSelectedTeam = 0;
|
||||
@@ -35,12 +41,36 @@ public class TeamManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
void testTeamSetting()
|
||||
{
|
||||
SelectableCharacterList.Add(new Character("YUETAO","default","C","pure dissidents"));
|
||||
SelectableCharacterList.Add(new Character("AYANO","default","B","default skillName"));
|
||||
SelectableCharacterList.Add(new Character("YUETAO","default","C","pure dissidents"));
|
||||
SelectableCharacterList.Add(new Character("AYANO","default","S","default skillName"));
|
||||
|
||||
//手动向currentTeamSettings和SelectableCharacterList添加测试数据
|
||||
currentTeamSettings.Add(0,new List<Character>());
|
||||
currentTeamSettings[0].Add(new Character("YUETAO","default","C","pure dissidents"));
|
||||
currentTeamSettings[0].Add(new Character("AYANO","default","B","default skillName"));
|
||||
currentTeamSettings[0].Add(new Character("YUETAO","default","C","pure dissidents"));
|
||||
currentTeamSettings[0].Add(new Character("YUETAO","default","C","pure dissidents"));
|
||||
|
||||
currentTeamSettings.Add(1,new List<Character>());
|
||||
currentTeamSettings[1].Add(new Character("YUETAO","default","C","pure dissidents"));
|
||||
currentTeamSettings[1].Add(new Character("AYANO","default","B","default skillName"));
|
||||
currentTeamSettings[1].Add(new Character("YUETAO","default","C","pure dissidents"));
|
||||
currentTeamSettings[1].Add(new Character("YUETAO","default","C","pure dissidents"));
|
||||
|
||||
Debug.Log("testTeamSetting ready");
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
if(teamSettingPanelInstance == null)
|
||||
{
|
||||
teamSettingPanelInstance = teamSettingPanel.Instance;
|
||||
}
|
||||
testTeamSetting();//接入玩家存档后请注释掉此行
|
||||
}
|
||||
/// <summary>
|
||||
/// 读取玩家存档信息后可直接在此写入编队信息
|
||||
+3
-8
@@ -12,7 +12,6 @@ public class teamCharacterView : MonoBehaviour
|
||||
public GameObject controlButton;
|
||||
public Image levelIcon;
|
||||
public Image charcterImg;
|
||||
public Image leaderStatusIcon;
|
||||
public TMP_Text skillName;
|
||||
|
||||
public GameObject isLeader;
|
||||
@@ -24,14 +23,9 @@ public class teamCharacterView : MonoBehaviour
|
||||
void Start()
|
||||
{
|
||||
character = gameObject;
|
||||
controlButton = transform.Find("move").gameObject;
|
||||
levelIcon = transform.Find("Level").GetComponent<Image>();
|
||||
charcterImg = transform.Find("Character").GetComponent<Image>();
|
||||
skillName = transform.Find("SkillName").GetComponent<TMP_Text>();
|
||||
isLeader = transform.Find("isLeader").gameObject;
|
||||
notLeader = transform.Find("notLeader").gameObject;
|
||||
levelIcon.sprite=null;
|
||||
charcterImg.sprite=null;
|
||||
controlButton.SetActive(isSelected);
|
||||
//Debug.Log("teamCharacterView Start,"+isSelected+","+listIndex);
|
||||
}
|
||||
/// <summary>
|
||||
/// 单机team列表内对象时触发选定
|
||||
@@ -68,4 +62,5 @@ public class teamCharacterView : MonoBehaviour
|
||||
TeamManager.Instance.swapTeamElements(this.listIndex, this.listIndex - 1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+48
-6
@@ -5,12 +5,23 @@ using utils;
|
||||
|
||||
public class teamSettingPanel : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// 编队页面顶父级对象,用于控制显示隐藏等操作
|
||||
/// </summary>
|
||||
[SerializeField]
|
||||
public GameObject teamSettingPanelObj;
|
||||
/// <summary>
|
||||
/// ui层编队显示,包含五个组件
|
||||
/// </summary>
|
||||
[SerializeField]
|
||||
public GameObject[] teamElementsObj;
|
||||
/// <summary>
|
||||
/// 左侧角色选择页组件
|
||||
/// </summary>
|
||||
[SerializeField]
|
||||
public GameObject[] teamCharactersObj;
|
||||
public GameObject teamCharacterPrefab;
|
||||
[SerializeField]
|
||||
public GameObject teamCharacterViewContent;
|
||||
|
||||
private TeamManager teamManager;
|
||||
|
||||
@@ -47,15 +58,25 @@ public class teamSettingPanel : MonoBehaviour
|
||||
public void openTeamSettingPanel()
|
||||
{
|
||||
updateTeamSettingElements();
|
||||
getSelectableCharacterList();
|
||||
//根据获取的队伍信息处理ui组件
|
||||
//可在此补充ui动画信息
|
||||
teamSettingPanelObj.SetActive(true);
|
||||
}
|
||||
public void closeTeamSettingPanel()=>teamSettingPanelObj.SetActive(false);
|
||||
|
||||
public void closeTeamSettingPanel()
|
||||
{
|
||||
teamSettingPanelObj.SetActive(false);
|
||||
Transform transform;
|
||||
for (int i = 0; i < teamCharacterViewContent.transform.childCount; i++)
|
||||
{
|
||||
transform = teamCharacterViewContent.transform.GetChild(i);
|
||||
GameObject.Destroy(transform.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateTeamSettingElements()
|
||||
{
|
||||
//todo:向保存编队信息的类获取编队信息,然后重新处理teamElementsObj的信息
|
||||
List<Character> currentTeam = teamManager.getCurrentSelectedTeam();
|
||||
for (int i = 0; i < teamElementsObj.Length && i < currentTeam.Count; i++)
|
||||
{
|
||||
@@ -64,14 +85,35 @@ public class teamSettingPanel : MonoBehaviour
|
||||
teamCharacterView t = teamElementsObj[i].GetComponent<teamCharacterView>();
|
||||
if(t!=null)
|
||||
{
|
||||
t.charcterImg.sprite = FileUtils.getImage("TeamCharacters/TeamCharacterImg/" + currentTeam[i].name);
|
||||
t.levelIcon.sprite = FileUtils.getImage("TeamCharacters/levelIcon/level" + currentTeam[i].boundaryLevel);
|
||||
Sprite sprite;
|
||||
sprite = FileUtils.getImage($"TeamCharacters/TeamCharacterImg/{currentTeam[i].name}");
|
||||
t.charcterImg.sprite = sprite;
|
||||
sprite = FileUtils.getImage($"TeamCharacters/levelIcon/level{currentTeam[i].boundaryLevel}");
|
||||
t.levelIcon.sprite = sprite;
|
||||
t.isLeader.SetActive(currentTeam[i].isLeader);
|
||||
t.notLeader.SetActive(!currentTeam[i].isLeader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取当前可选入队伍的角色列表,并显示在界面上
|
||||
/// </summary>
|
||||
public void getSelectableCharacterList()
|
||||
{
|
||||
List<Character> selectAbleCharacters = teamManager.SelectableCharacterList;
|
||||
foreach (Character c in selectAbleCharacters)
|
||||
{
|
||||
GameObject characterObj = Instantiate(teamCharacterPrefab, teamCharacterViewContent.transform);
|
||||
CharacterCardView ccv = characterObj.GetComponent<CharacterCardView>();
|
||||
if (ccv != null)
|
||||
{
|
||||
ccv.characterName = c.name;
|
||||
ccv.characterImage.sprite = FileUtils.getImage($"TeamCharacters/CharacterImg/{c.name}");
|
||||
ccv.levelIcon.sprite = FileUtils.getImage($"TeamCharacters/levelIcon/level{c.boundaryLevel}");
|
||||
ccv.occupationIcon.sprite = FileUtils.getImage($"TeamCharacters/OccupationIcon/{c.occupation}");
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 将当前角色向下交换位置
|
||||
@@ -6,22 +6,22 @@ using UnityEngine.UI;
|
||||
public class BeatmapManager : MonoBehaviour
|
||||
|
||||
{
|
||||
public Beatmap beatmap; // 当前谱面数据
|
||||
public Beatmap beatmap; // 当前谱面数据
|
||||
|
||||
// 音符生成器引用
|
||||
// 音符生成器引用
|
||||
public NoteSpawner noteSpawner;
|
||||
|
||||
|
||||
|
||||
// 保存谱面数据到 JSON 文件
|
||||
// 保存谱面数据到 JSON 文件
|
||||
//public void SaveBeatmap(string fileName)
|
||||
//{
|
||||
// string json = JsonUtility.ToJson(beatmap, true); // 格式化 JSON 输出
|
||||
// string json = JsonUtility.ToJson(beatmap, true); // 格式化 JSON 输出
|
||||
// File.WriteAllText(Application.dataPath + "/" + fileName, json);
|
||||
// Debug.Log("谱面已保存:" + Application.dataPath + "/" + fileName);
|
||||
// Debug.Log("谱面已保存:" + Application.dataPath + "/" + fileName);
|
||||
//}
|
||||
|
||||
// 从 JSON 文件加载谱面数据
|
||||
// 从 JSON 文件加载谱面数据
|
||||
public void LoadBeatmap(string fileName)
|
||||
{
|
||||
string path = Application.streamingAssetsPath + "/" + fileName;
|
||||
@@ -29,23 +29,23 @@ public class BeatmapManager : MonoBehaviour
|
||||
{
|
||||
string json = File.ReadAllText(path);
|
||||
beatmap = JsonUtility.FromJson<Beatmap>(json);
|
||||
Debug.Log("谱面已加载:" + json);
|
||||
Debug.Log("谱面已加载:" + json);
|
||||
|
||||
// 在加载后立即调用音符生成
|
||||
// 在加载后立即调用音符生成
|
||||
noteSpawner.LoadBeatmap(beatmap);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("文件不存在:" + path);
|
||||
Debug.LogError("文件不存在:" + path);
|
||||
}
|
||||
}
|
||||
public void LoadBeatmap(Beatmap loadedBeatmap)
|
||||
{
|
||||
beatmap = loadedBeatmap;
|
||||
Debug.Log("谱面已加载:" + beatmap.title);
|
||||
Debug.Log("谱面已加载:" + beatmap.title);
|
||||
|
||||
// 在加载后立即调用音符生成
|
||||
// 在加载后立即调用音符生成
|
||||
noteSpawner.LoadBeatmap(beatmap);
|
||||
}
|
||||
|
||||
@@ -56,15 +56,15 @@ public class BeatmapManager : MonoBehaviour
|
||||
// {
|
||||
// string json = File.ReadAllText(path);
|
||||
// Beatmap beatmap = JsonUtility.FromJson<Beatmap>(json);
|
||||
// beatmapManager.LoadBeatmap(beatmap); // 使用 LoadBeatmap 方法传递 Beatmap 对象
|
||||
// beatmapManager.LoadBeatmap(beatmap); // 使用 LoadBeatmap 方法传递 Beatmap 对象
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Debug.LogError("文件不存在:" + path);
|
||||
// Debug.LogError("文件不存在:" + path);
|
||||
// }
|
||||
//}
|
||||
|
||||
// 创建一个示例谱面并保存
|
||||
// 创建一个示例谱面并保存
|
||||
//public void CreateSampleBeatmap()
|
||||
//{
|
||||
// beatmap = new Beatmap
|
||||
@@ -105,7 +105,7 @@ public class BeatmapManager : MonoBehaviour
|
||||
// SaveBeatmap("test_beatmap.json");
|
||||
//}
|
||||
|
||||
// 读取并加载当前谱面到音符生成器
|
||||
// 读取并加载当前谱面到音符生成器
|
||||
public void LoadBeatmapFromFile()
|
||||
{
|
||||
string path = Application.streamingAssetsPath + "/Emilia_demo.json";
|
||||
@@ -117,15 +117,15 @@ public class BeatmapManager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("谱面文件未找到!");
|
||||
Debug.LogError("谱面文件未找到!");
|
||||
}
|
||||
}
|
||||
|
||||
// 在 Start() 方法中初始化
|
||||
// 在 Start() 方法中初始化
|
||||
void Start()
|
||||
{
|
||||
// 这里可以选择在启动时创建一个示例谱面并加载
|
||||
//CreateSampleBeatmap(); // 创建并保存一个示例谱面
|
||||
LoadBeatmap("Emilia_demo.json"); // 加载并实例化音符
|
||||
// 这里可以选择在启动时创建一个示例谱面并加载
|
||||
//CreateSampleBeatmap(); // 创建并保存一个示例谱面
|
||||
LoadBeatmap("Emilia_demo.json"); // 加载并实例化音符
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ public class JudgeManager : MonoBehaviour
|
||||
private Dictionary<KeyCode, Queue<Note>> judgeQueues = new Dictionary<KeyCode, Queue<Note>>();
|
||||
private Dictionary<string, bool> startJudgedNotes = new Dictionary<string, bool>();
|
||||
private Dictionary<string, bool> releasedNotes = new Dictionary<string, bool>();
|
||||
// 记录 End 段的 scheduledEndTime(防止 End 被回收后仍然能判定)
|
||||
// 记录 End 段的 scheduledEndTime(防止 End 被回收后仍然能判定)
|
||||
private Dictionary<string, float> noteEndTimes = new Dictionary<string, float>();
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public class JudgeManager : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 记录某个颜色的长音符 End 段的 scheduledEndTime
|
||||
/// 记录某个颜色的长音符 End 段的 scheduledEndTime
|
||||
/// </summary>
|
||||
public void RegisterScheduledEndTime(string noteColor, float endTime)
|
||||
{
|
||||
@@ -34,7 +34,7 @@ public class JudgeManager : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取某个颜色的 End 段的 scheduledEndTime
|
||||
/// 获取某个颜色的 End 段的 scheduledEndTime
|
||||
/// </summary>
|
||||
public float GetScheduledEndTime(string noteColor)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ public class JudgeManager : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 当音符进入判定区域时调用
|
||||
/// 当音符进入判定区域时调用
|
||||
/// </summary>
|
||||
public void RegisterNote(KeyCode key, Note note)
|
||||
{
|
||||
@@ -77,7 +77,7 @@ public class JudgeManager : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 当音符离开判定区域时调用
|
||||
/// 当音符离开判定区域时调用
|
||||
/// </summary>
|
||||
public void UnregisterNote(KeyCode key, Note note)
|
||||
{
|
||||
@@ -93,7 +93,7 @@ public class JudgeManager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
// **如果音符未被判定,则触发 Miss**
|
||||
// **如果音符未被判定,则触发 Miss**
|
||||
if (!n.IsJudged())
|
||||
{
|
||||
n.JudgeMiss();
|
||||
@@ -104,13 +104,13 @@ public class JudgeManager : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按键按下时,判定队列中最早进入的音符
|
||||
/// 按键按下时,判定队列中最早进入的音符
|
||||
/// </summary>
|
||||
public void JudgeEarliestNote(KeyCode key)
|
||||
{
|
||||
if (judgeQueues.ContainsKey(key) && judgeQueues[key].Count > 0)
|
||||
{
|
||||
Note note = judgeQueues[key].Dequeue(); // 只取最早的音符
|
||||
Note note = judgeQueues[key].Dequeue(); // 只取最早的音符
|
||||
if (note != null && !note.IsJudged())
|
||||
{
|
||||
note.Judge();
|
||||
|
||||
@@ -7,7 +7,7 @@ public class KeyBindingManager : MonoBehaviour
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Debug.Log("KeyBindingManager Awake() 被调用,开始加载按键映射...");
|
||||
Debug.Log("KeyBindingManager Awake() 被调用,开始加载按键映射...");
|
||||
|
||||
if (keyBindings.Count == 0)
|
||||
{
|
||||
@@ -15,18 +15,18 @@ public class KeyBindingManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> 获取颜色对应的按键 </summary>
|
||||
/// <summary> 获取颜色对应的按键 </summary>
|
||||
public static KeyCode GetKeyForColor(string color)
|
||||
{
|
||||
if (keyBindings.TryGetValue(color.ToLower(), out KeyCode key))
|
||||
{
|
||||
return key;
|
||||
}
|
||||
Debug.LogError($"未找到颜色 {color} 对应的按键!请检查 KeyBindingManager 是否正确初始化。");
|
||||
Debug.LogError($"未找到颜色 {color} 对应的按键!请检查 KeyBindingManager 是否正确初始化。");
|
||||
return KeyCode.None;
|
||||
}
|
||||
|
||||
/// <summary> 修改按键绑定 </summary>
|
||||
/// <summary> 修改按键绑定 </summary>
|
||||
public static void ChangeKeyBinding(string color, KeyCode newKey)
|
||||
{
|
||||
if (keyBindings.ContainsKey(color.ToLower()))
|
||||
@@ -41,7 +41,7 @@ public class KeyBindingManager : MonoBehaviour
|
||||
SaveKeyBindings();
|
||||
}
|
||||
|
||||
/// <summary> 存储按键绑定到 `PlayerPrefs` </summary>
|
||||
/// <summary> 存储按键绑定到 `PlayerPrefs` </summary>
|
||||
private static void SaveKeyBindings()
|
||||
{
|
||||
foreach (var kvp in keyBindings)
|
||||
@@ -51,7 +51,7 @@ public class KeyBindingManager : MonoBehaviour
|
||||
PlayerPrefs.Save();
|
||||
}
|
||||
|
||||
/// <summary> 从 `PlayerPrefs` 加载按键绑定 </summary>
|
||||
/// <summary> 从 `PlayerPrefs` 加载按键绑定 </summary>
|
||||
private static void LoadKeyBindings()
|
||||
{
|
||||
string[] colors = { "red", "green", "yellow", "purple", "blue" };
|
||||
@@ -69,6 +69,6 @@ public class KeyBindingManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log("KeyBindings 初始化成功:" + string.Join(", ", keyBindings));
|
||||
Debug.Log("KeyBindings 初始化成功:" + string.Join(", ", keyBindings));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ public class NoteController : MonoBehaviour
|
||||
{
|
||||
private float speed;
|
||||
private bool isMoving = true;
|
||||
private bool isInJudgeZone = false; // 判定区域标记
|
||||
private bool isInJudgeZone = false; // 判定区域标记
|
||||
|
||||
private ParticleSystem hitEffect;
|
||||
private Note linkedNote;
|
||||
@@ -59,7 +59,7 @@ public class NoteController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// 将 OnTriggerEnter2D 和 OnTriggerExit2D 挂载在 Controller 上
|
||||
// 将 OnTriggerEnter2D 和 OnTriggerExit2D 挂载在 Controller 上
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D collision)
|
||||
{
|
||||
@@ -92,7 +92,7 @@ public class NoteController : MonoBehaviour
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 供 Note 查询是否处于判定区域
|
||||
/// 供 Note 查询是否处于判定区域
|
||||
/// </summary>
|
||||
public bool IsInJudgeZone()
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ public class TrackKeyManager : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 当音符进入判定区域时,添加按键映射
|
||||
/// 当音符进入判定区域时,添加按键映射
|
||||
/// </summary>
|
||||
public void RegisterKey(int trackIndex, KeyCode key)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ public class TrackKeyManager : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 当音符离开判定区域时,移除按键映射
|
||||
/// 当音符离开判定区域时,移除按键映射
|
||||
/// </summary>
|
||||
public void UnregisterKey(int trackIndex, KeyCode key)
|
||||
{
|
||||
@@ -45,7 +45,7 @@ public class TrackKeyManager : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取轨道当前的按键(队列头)
|
||||
/// 获取轨道当前的按键(队列头)
|
||||
/// </summary>
|
||||
public KeyCode GetCurrentKey(int trackIndex)
|
||||
{
|
||||
@@ -53,6 +53,6 @@ public class TrackKeyManager : MonoBehaviour
|
||||
{
|
||||
return trackKeyMappings[trackIndex].Peek();
|
||||
}
|
||||
return KeyCode.None; // 无按键
|
||||
return KeyCode.None; // 无按键
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user