右Alt Space播放

This commit is contained in:
2025-06-21 23:09:34 +08:00
parent 56cd335eb2
commit 3b299178c0
6 changed files with 1387 additions and 206 deletions

View File

@@ -49,10 +49,10 @@ MonoBehaviour:
m_addressable:
m_atlas:
m_fileSize: 26252
m_assetChangeTS: 1750515828
m_fileInfoReadTS: 1750515828
m_fileWriteTS: 1750515828
m_cachefileWriteTS: 1750515828
m_assetChangeTS: 1750518401
m_fileInfoReadTS: 1750518402
m_fileWriteTS: 1750518400
m_cachefileWriteTS: 1750518400
refreshStamp: 3
UseGUIDsList:
- guid: fc6c02e75b66345c29e8a25e2e2bda9c
@@ -11540,10 +11540,10 @@ MonoBehaviour:
m_addressable:
m_atlas:
m_fileSize: 3645
m_assetChangeTS: 1750511889
m_fileInfoReadTS: 1750511955
m_fileWriteTS: 1750511888
m_cachefileWriteTS: 1750511888
m_assetChangeTS: 1750516443
m_fileInfoReadTS: 1750516724
m_fileWriteTS: 1750516443
m_cachefileWriteTS: 1750516443
refreshStamp: 3
UseGUIDsList:
- guid: bf2edee5c58d82540a51f03df9d42094
@@ -27234,10 +27234,10 @@ MonoBehaviour:
m_addressable:
m_atlas:
m_fileSize: 3642
m_assetChangeTS: 1750511889
m_fileInfoReadTS: 1750511955
m_fileWriteTS: 1750511888
m_cachefileWriteTS: 1750511888
m_assetChangeTS: 1750516443
m_fileInfoReadTS: 1750516724
m_fileWriteTS: 1750516443
m_cachefileWriteTS: 1750516443
refreshStamp: 3
UseGUIDsList:
- guid: bf2edee5c58d82540a51f03df9d42094
@@ -143508,15 +143508,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: 7ab6cd8f9a2e77c49a158e16014f9cec
type: 9
m_fileInfoHash: 1099053.json
m_fileInfoHash: 1045198.json
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 1099053
m_assetChangeTS: 0
m_fileInfoReadTS: 1750510504
m_fileWriteTS: 1750491609
m_cachefileWriteTS: 1750491609
m_fileSize: 1045198
m_assetChangeTS: 1750518268
m_fileInfoReadTS: 1750518289
m_fileWriteTS: 1750517908
m_cachefileWriteTS: 1750517908
refreshStamp: 3
UseGUIDsList: []
- guid: 7af6ac3e6b51b8d4aab04adc85b8de2f
@@ -156582,15 +156582,15 @@ MonoBehaviour:
ids: 4a000000
- guid: 6bc62b724b099426b9121ce12d1dc1cd
type: 2
m_fileInfoHash: 12133.cs
m_fileInfoHash: 12628.cs
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 12133
m_assetChangeTS: 1750511594
m_fileInfoReadTS: 1750511603
m_fileWriteTS: 1750511505
m_cachefileWriteTS: 1750511505
m_fileSize: 12628
m_assetChangeTS: 1750518294
m_fileInfoReadTS: 1750518321
m_fileWriteTS: 1750518293
m_cachefileWriteTS: 1750518293
refreshStamp: 3
UseGUIDsList: []
- guid: 6b072012b6a4e46799f0eb93c989ce51
@@ -157655,10 +157655,10 @@ MonoBehaviour:
m_addressable:
m_atlas:
m_fileSize: 3649
m_assetChangeTS: 1750511889
m_fileInfoReadTS: 1750511955
m_fileWriteTS: 1750511888
m_cachefileWriteTS: 1750511888
m_assetChangeTS: 1750516443
m_fileInfoReadTS: 1750516724
m_fileWriteTS: 1750516443
m_cachefileWriteTS: 1750516443
refreshStamp: 3
UseGUIDsList:
- guid: bf2edee5c58d82540a51f03df9d42094
@@ -169551,15 +169551,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: 6c12bb7674cd5416f8d846e62018a96d
type: 2
m_fileInfoHash: 1598.cs
m_fileInfoHash: 1933.cs
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 1598
m_assetChangeTS: 0
m_fileInfoReadTS: 1750510501
m_fileWriteTS: 1748614074
m_cachefileWriteTS: 1748614074
m_fileSize: 1933
m_assetChangeTS: 1750517418
m_fileInfoReadTS: 1750517447
m_fileWriteTS: 1750517370
m_cachefileWriteTS: 1750517370
refreshStamp: 3
UseGUIDsList: []
- guid: 6c52483422841154a88cf13e132c0252
@@ -193375,15 +193375,15 @@ MonoBehaviour:
ids: 73000000
- guid: 2e498d1c8094910479dc3e1b768306a4
type: 5
m_fileInfoHash: 9628.asset
m_fileInfoHash: 560939.asset
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 9628
m_assetChangeTS: 1750511889
m_fileInfoReadTS: 1750511955
m_fileWriteTS: 1750511888
m_cachefileWriteTS: 1750511888
m_fileSize: 560939
m_assetChangeTS: 1750518401
m_fileInfoReadTS: 1750518402
m_fileWriteTS: 1750518400
m_cachefileWriteTS: 1750518400
refreshStamp: 3
UseGUIDsList:
- guid: fe393ace9b354375a9cb14cdbbc28be4

View File

@@ -119,15 +119,23 @@ namespace Ichni.Editor
private void MusicPlayerOperation()
{
if (Keyboard.current.enterKey.wasPressedThisFrame && !isPointerOverUI) // 回车键 播放或暂停音乐
if (!isPointerOverUI)
{
if (!EditorManager.instance.musicPlayer.isPlaying)
if (Keyboard.current.spaceKey.wasPressedThisFrame) // 回车键 播放或暂停音乐
{
EditorManager.instance.musicPlayer.PlayMusic();
if (!EditorManager.instance.musicPlayer.isPlaying)
{
EditorManager.instance.musicPlayer.PlayMusic();
}
else
{
EditorManager.instance.musicPlayer.PauseMusic();
}
}
else
if (Keyboard.current.rightAltKey.wasPressedThisFrame)
{
EditorManager.instance.musicPlayer.PauseMusic();
StartCoroutine(EditorManager.instance.musicPlayer.PlayBackMusic());
}
}
}

View File

@@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using Ichni.RhythmGame;
using UnityEngine;
using UnityEngine.InputSystem;
namespace Ichni.Editor
{
@@ -35,7 +36,15 @@ namespace Ichni.Editor
if (isPlaying) audioSource.Play();
else PauseMusic();
}
public IEnumerator PlayBackMusic()
{
float startt = audioSource.time;
PlayMusic();
yield return new WaitUntil(() => Keyboard.current.rightAltKey.wasReleasedThisFrame);
audioSource.time = startt;
PauseMusic();
}
public void PauseMusic()
{
isPlaying = false;

View File

@@ -2253,102 +2253,6 @@
"startTime" : 7.2,
"endTime" : 9.6,
"animationCurveType" : 30
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 16.8,
"endTime" : 17.1,
"animationCurveType" : 0
},{
"startValue" : 1,
"endValue" : 0,
"startTime" : 17.4,
"endTime" : 17.7,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 17.7,
"endTime" : 18,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 18,
"endTime" : 18.3,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 18.6,
"endTime" : 18.9,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 19.2,
"endTime" : 19.5,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 19.5,
"endTime" : 19.5,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 19.5,
"endTime" : 19.5,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 19.5,
"endTime" : 19.5,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 19.5,
"endTime" : 19.5,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 19.5,
"endTime" : 19.5,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 19.5,
"endTime" : 19.5,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 19.5,
"endTime" : 19.8,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 19.5,
"endTime" : 19.5,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 19.5,
"endTime" : 19.5,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 20.1,
"endTime" : 20.4,
"animationCurveType" : 0
}
]
},
@@ -2366,54 +2270,6 @@
"startTime" : 8.400001,
"endTime" : 9.600001,
"animationCurveType" : 29
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 16.2,
"endTime" : 16.5,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 16.8,
"endTime" : 17.1,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 17.4,
"endTime" : 17.7,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 17.7,
"endTime" : 18,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 18.3,
"endTime" : 18.6,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 19.2,
"endTime" : 19.5,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 19.8,
"endTime" : 20.1,
"animationCurveType" : 0
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 20.1,
"endTime" : 20.4,
"animationCurveType" : 0
}
]
},
@@ -2527,12 +2383,6 @@
"startTime" : 18.9,
"endTime" : 19.35,
"animationCurveType" : 20
},{
"startValue" : 0,
"endValue" : 0,
"startTime" : 19.8,
"endTime" : 20.1,
"animationCurveType" : 0
}
]
},

File diff suppressed because one or more lines are too long

View File

@@ -42,7 +42,8 @@ Song Location歌曲路径导入后歌曲存储在编辑器内与原路
### **音乐播放器操作**
1. **Enter**:播放或暂停音乐。
1. **Space**:播放或暂停音乐。
2. **右Alt**:临时播放音乐,松开后回到按下之前的位置
---