Timeline
This commit is contained in:
File diff suppressed because one or more lines are too long
8
Assets/Prefabs/DynamicUI/Timeline.meta
Normal file
8
Assets/Prefabs/DynamicUI/Timeline.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ff2f99effb86c4d87961f414333941b1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
340
Assets/Prefabs/DynamicUI/Timeline/TimePointer.prefab
Normal file
340
Assets/Prefabs/DynamicUI/Timeline/TimePointer.prefab
Normal file
@@ -0,0 +1,340 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2582902444679084577
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2582902444679084590}
|
||||
- component: {fileID: 2582902444679084588}
|
||||
- component: {fileID: 2582902444679084591}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2582902444679084590
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2582902444679084577}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2582902445438646078}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -15, y: -20.000017}
|
||||
m_SizeDelta: {x: 1, y: 15}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2582902444679084588
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2582902444679084577}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2582902444679084591
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2582902444679084577}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &2582902444683976579
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2582902444683976576}
|
||||
- component: {fileID: 2582902444683976590}
|
||||
- component: {fileID: 2582902444683976577}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2582902444683976576
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2582902444683976579}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2582902445438646078}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -14.75, y: -7.5}
|
||||
m_SizeDelta: {x: 35, y: 10}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2582902444683976590
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2582902444683976579}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2582902444683976577
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2582902444683976579}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 2500
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 8.95
|
||||
m_fontSizeBase: 7
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 1
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &2582902445438646065
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2582902445438646078}
|
||||
- component: {fileID: 6174044362262476810}
|
||||
m_Layer: 5
|
||||
m_Name: TimePointer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2582902445438646078
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2582902445438646065}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2582902444683976576}
|
||||
- {fileID: 2582902444679084590}
|
||||
- {fileID: 6154873186894274620}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
m_AnchoredPosition: {x: 765, y: 0}
|
||||
m_SizeDelta: {x: 30, y: 55}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &6174044362262476810
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2582902445438646065}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 644b6d8f3317b4ed783580811fef5da7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
intervalUnitText: {fileID: 2582902444683976577}
|
||||
time: 0
|
||||
index: 0
|
||||
--- !u!1 &6138713425876344253
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6154873186894274620}
|
||||
- component: {fileID: 7763882505229129983}
|
||||
- component: {fileID: 8314419908959713163}
|
||||
m_Layer: 5
|
||||
m_Name: Image (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6154873186894274620
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6138713425876344253}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2582902445438646078}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -15, y: -87.5}
|
||||
m_SizeDelta: {x: 1, y: 120}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7763882505229129983
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6138713425876344253}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8314419908959713163
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6138713425876344253}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0.5019608}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec60393c018da4f6391c78638e868a5a
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@@ -25,9 +25,9 @@ namespace Ichni.RhythmGame
|
||||
|
||||
protected virtual void Update()
|
||||
{
|
||||
if (timeDurationSubmodule.CheckTimeInDuration(EditorManager.instance.songModule.songTime))
|
||||
if (timeDurationSubmodule.CheckTimeInDuration(EditorManager.instance.songInformation.songTime))
|
||||
{
|
||||
UpdateAnimation(EditorManager.instance.songModule.songTime);
|
||||
UpdateAnimation(EditorManager.instance.songInformation.songTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,9 +13,7 @@ namespace Ichni
|
||||
public class EditorManager : SerializedMonoBehaviour
|
||||
{
|
||||
public static EditorManager instance;
|
||||
|
||||
public SongModule songModule;
|
||||
|
||||
|
||||
public ProjectManager projectManager;
|
||||
public EditorUIManager uiManager;
|
||||
public EditorSettings editorSettings;
|
||||
@@ -38,8 +36,8 @@ namespace Ichni
|
||||
{
|
||||
//CreateNew();
|
||||
projectManager.loadManager.Load("TestProject");
|
||||
AudioSource.PlayClipAtPoint(songInformation.song, Vector3.zero);
|
||||
|
||||
uiManager.timeline.musicPlayer.audioSource.clip = songInformation.song;
|
||||
|
||||
beatmapContainer.gameElementList.ForEach(gameElement =>
|
||||
{
|
||||
if (gameElement is IHaveTransformSubmodule transformedElement)
|
||||
@@ -55,11 +53,6 @@ namespace Ichni
|
||||
// projectManager.exportManager.Export();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
songModule.songTime += Time.deltaTime;
|
||||
}
|
||||
|
||||
private void CreateNew()
|
||||
{
|
||||
projectManager.GenerateProject("TestProject");
|
||||
@@ -100,10 +93,4 @@ namespace Ichni
|
||||
"basic", "BasicNoteTap3D");
|
||||
}
|
||||
}
|
||||
|
||||
public class SongModule
|
||||
{
|
||||
public float songTime;
|
||||
public float songBeat;
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,9 @@ namespace Ichni.RhythmGame
|
||||
public float bpm; //每分钟节拍数
|
||||
public float delay; //设定音乐和谱面延迟Delay秒后开始,在延迟中,SongPosition为负数。
|
||||
|
||||
public float songTime;
|
||||
public float songBeat => songTime / 60 * bpm;
|
||||
|
||||
public BaseElement_BM matchedBM { get; set; }
|
||||
|
||||
public SongInformation(string songName, float bpm, float delay)
|
||||
|
||||
@@ -13,6 +13,8 @@ using System.Linq;
|
||||
using Unity.VisualScripting;
|
||||
using Ichni.RhythmGame;
|
||||
using Sirenix.Utilities;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
//又在写大粪 ——神币
|
||||
namespace Ichni.Editor
|
||||
{
|
||||
@@ -44,13 +46,13 @@ namespace Ichni.Editor
|
||||
}catch(Exception e){Debug.LogWarning("WTF Command! "+e);}
|
||||
}
|
||||
private void Update(){
|
||||
if(Input.GetKeyDown(KeyCode.BackQuote)){
|
||||
if(Keyboard.current.backquoteKey.wasPressedThisFrame){
|
||||
hierarchy.gameObject.SetActive(isHide);
|
||||
inspector.gameObject.SetActive(isHide);
|
||||
isHide=!isHide;
|
||||
}
|
||||
if(InputCommand.isFocused){
|
||||
if(Input.GetKeyDown(KeyCode.DownArrow)){
|
||||
if(Keyboard.current.downArrowKey.wasPressedThisFrame){
|
||||
if(historyCommand.Count-1>historycount){
|
||||
historycount++;
|
||||
InputCommand.text=historyCommand[historycount];}
|
||||
@@ -60,7 +62,7 @@ namespace Ichni.Editor
|
||||
}
|
||||
|
||||
}
|
||||
if(Input.GetKeyDown(KeyCode.UpArrow)&&historycount!=0){
|
||||
if(Keyboard.current.upArrowKey.wasPressedThisFrame && historycount!=0){
|
||||
historycount--;
|
||||
InputCommand.text=historyCommand[historycount];
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace Ichni.Editor
|
||||
{
|
||||
public Hierarchy hierarchy;
|
||||
public Inspector inspector;
|
||||
public Timeline timeline;
|
||||
|
||||
}
|
||||
}
|
||||
8
Assets/Scripts/DynamicUI/Timeline.meta
Normal file
8
Assets/Scripts/DynamicUI/Timeline.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 32c7b2a98f24748239f7c8ac6e6229f3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
52
Assets/Scripts/DynamicUI/Timeline/MusicPlayer.cs
Normal file
52
Assets/Scripts/DynamicUI/Timeline/MusicPlayer.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Ichni.Editor
|
||||
{
|
||||
public class MusicPlayer : MonoBehaviour
|
||||
{
|
||||
public bool isPlaying;
|
||||
public AudioSource audioSource;
|
||||
|
||||
public Button playButton;
|
||||
public Button pauseButton;
|
||||
public Button stopButton;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
audioSource = GetComponent<AudioSource>();
|
||||
playButton.onClick.AddListener(PlayMusic);
|
||||
pauseButton.onClick.AddListener(PauseMusic);
|
||||
stopButton.onClick.AddListener(StopMusic);
|
||||
}
|
||||
|
||||
public void PlayMusic()
|
||||
{
|
||||
isPlaying = true;
|
||||
Trail.SetAllTrails(true, false);
|
||||
EditorManager.instance.songInformation.songTime = audioSource.time;
|
||||
audioSource.Play();
|
||||
}
|
||||
|
||||
public void PauseMusic()
|
||||
{
|
||||
isPlaying = false;
|
||||
Trail.SetAllTrails(false, false);
|
||||
EditorManager.instance.songInformation.songTime = audioSource.time;
|
||||
audioSource.Pause();
|
||||
}
|
||||
|
||||
public void StopMusic()
|
||||
{
|
||||
isPlaying = false;
|
||||
Trail.SetAllTrails(false, true);
|
||||
EditorManager.instance.songInformation.songTime = 0;
|
||||
audioSource.Stop();
|
||||
EditorManager.instance.uiManager.timeline.timePointerModule.SetRange(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/DynamicUI/Timeline/MusicPlayer.cs.meta
Normal file
11
Assets/Scripts/DynamicUI/Timeline/MusicPlayer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4d97c1cf488304279b0c7c7bdb1fb3d8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
18
Assets/Scripts/DynamicUI/Timeline/TimeInfoModule.cs
Normal file
18
Assets/Scripts/DynamicUI/Timeline/TimeInfoModule.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class TimeInfoModule : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/DynamicUI/Timeline/TimeInfoModule.cs.meta
Normal file
11
Assets/Scripts/DynamicUI/Timeline/TimeInfoModule.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b5b697045922f4d4d90c9f8b499b5ac6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
15
Assets/Scripts/DynamicUI/Timeline/TimePointer.cs
Normal file
15
Assets/Scripts/DynamicUI/Timeline/TimePointer.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UniRx;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.Editor
|
||||
{
|
||||
public class TimePointer : MonoBehaviour
|
||||
{
|
||||
public TMP_Text intervalUnitText;
|
||||
public float time;
|
||||
public int index;
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/DynamicUI/Timeline/TimePointer.cs.meta
Normal file
11
Assets/Scripts/DynamicUI/Timeline/TimePointer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 644b6d8f3317b4ed783580811fef5da7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
216
Assets/Scripts/DynamicUI/Timeline/TimePointerModule.cs
Normal file
216
Assets/Scripts/DynamicUI/Timeline/TimePointerModule.cs
Normal file
@@ -0,0 +1,216 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame;
|
||||
using UniRx;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Ichni.Editor
|
||||
{
|
||||
public partial class TimePointerModule : MonoBehaviour
|
||||
{
|
||||
private Timeline timeline => EditorManager.instance.uiManager.timeline;
|
||||
private SongInformation songInformation => EditorManager.instance.songInformation;
|
||||
|
||||
public GameObject timePointerPrefab;
|
||||
public List<TimePointer> timePointerList;
|
||||
|
||||
public RectTransform timePointerArea;
|
||||
public RectTransform visibleTimePointerArea;
|
||||
|
||||
public RectTransform mainTimePointer;
|
||||
|
||||
public float intervalUnit;
|
||||
public float timePointerInterval;
|
||||
public float sizeNegative, sizePositive;
|
||||
public int negativePointerAmount, positivePointerAmount, totalPointerAmount;
|
||||
/// <summary>
|
||||
/// delay时间区间中,(-delay, 0)的距离偏移量
|
||||
/// </summary>
|
||||
public float delayDistanceOffset;
|
||||
|
||||
public float leftSideSongTime, rightSideSongTime, songTimeDistance;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Observable.NextFrame().Subscribe(_ =>
|
||||
{
|
||||
timePointerList = new List<TimePointer>();
|
||||
Initialize(2, 120);
|
||||
});
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (timeline.musicPlayer.isPlaying)
|
||||
{
|
||||
songInformation.songTime = timeline.musicPlayer.audioSource.time;
|
||||
SetRange(songInformation.songTime);
|
||||
}
|
||||
|
||||
timePointerList.ForEach(pointer =>
|
||||
{
|
||||
bool isActive = pointer.time >= leftSideSongTime && pointer.time <= rightSideSongTime;
|
||||
pointer.gameObject.SetActive(isActive);
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化所有Timeline指示线
|
||||
/// </summary>
|
||||
/// <param name="delay"></param>
|
||||
/// <param name="bpm"></param>
|
||||
public void Initialize(float delay, float bpm)
|
||||
{
|
||||
timePointerInterval = 30;
|
||||
ClearPointers();
|
||||
|
||||
int beatDivider = 1;
|
||||
|
||||
intervalUnit = (60f / bpm) / beatDivider * 1000;
|
||||
|
||||
sizeNegative = delay * beatDivider / timeline.timePerBeat;
|
||||
sizePositive = songInformation.song.length * beatDivider / timeline.timePerBeat;
|
||||
|
||||
negativePointerAmount = Mathf.CeilToInt(sizeNegative);
|
||||
positivePointerAmount = Mathf.CeilToInt(sizePositive);
|
||||
|
||||
totalPointerAmount = negativePointerAmount + positivePointerAmount;
|
||||
|
||||
timePointerArea.sizeDelta = new Vector2(timePointerInterval * (sizeNegative + sizePositive), 60f);
|
||||
|
||||
delayDistanceOffset = timePointerInterval * (negativePointerAmount - sizeNegative);
|
||||
|
||||
leftSideSongTime = timeline.beatmapStartTime;
|
||||
rightSideSongTime = timeline.timePerBeat * (visibleTimePointerArea.rect.width / timePointerInterval);
|
||||
songTimeDistance = rightSideSongTime;
|
||||
|
||||
for (int i = -negativePointerAmount; i <= positivePointerAmount; i++)
|
||||
{
|
||||
CreatePointer(beatDivider, i);
|
||||
}
|
||||
|
||||
//ChangeSongTimeDistance(0);
|
||||
SetRange(timeline.beatmapStartTime);
|
||||
}
|
||||
}
|
||||
|
||||
public partial class TimePointerModule
|
||||
{
|
||||
/// <summary>
|
||||
/// 设置Timeline的显示区间,区间宽度使用当前的区间宽度
|
||||
/// </summary>
|
||||
/// <param name="startTime">开始时间,结束时间即(开始时间+区间宽度)</param>
|
||||
public void SetRange(float startTime)
|
||||
{
|
||||
startTime = Mathf.Clamp(startTime, timeline.beatmapStartTime, songInformation.song.length);
|
||||
|
||||
timePointerArea.anchoredPosition =
|
||||
new Vector2((timePointerArea.sizeDelta.x / 2) -
|
||||
((startTime + songInformation.delay) / timeline.timePerBeat) * timePointerInterval, 0);
|
||||
|
||||
float proportion = mainTimePointer.anchoredPosition.x / visibleTimePointerArea.rect.width;
|
||||
|
||||
leftSideSongTime = startTime - songTimeDistance * proportion;
|
||||
rightSideSongTime = startTime + songTimeDistance * (1 - proportion);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成指示线
|
||||
/// </summary>
|
||||
/// <param name="beatDivider">细分X分音符</param>
|
||||
/// <param name="index"></param>
|
||||
private void CreatePointer(int beatDivider, int index)
|
||||
{
|
||||
TimePointer pointer = Instantiate(timePointerPrefab, timePointerArea).GetComponent<TimePointer>();
|
||||
timePointerList.Add(pointer);
|
||||
pointer.index = index;
|
||||
|
||||
pointer.GetComponent<RectTransform>().anchoredPosition =
|
||||
new Vector2((index + negativePointerAmount) * timePointerInterval + 15f - delayDistanceOffset, 0);
|
||||
|
||||
pointer.time = index * intervalUnit / 1000f;
|
||||
pointer.intervalUnitText.text = Mathf.RoundToInt(index * intervalUnit).ToString();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新指示线位置
|
||||
/// </summary>
|
||||
private void UpdatePointers()
|
||||
{
|
||||
delayDistanceOffset = timePointerInterval * (negativePointerAmount - sizeNegative);
|
||||
timePointerArea.sizeDelta = new Vector2(timePointerInterval * totalPointerAmount, 55f);
|
||||
|
||||
foreach (var pointer in timePointerList)
|
||||
{
|
||||
pointer.GetComponent<RectTransform>().anchoredPosition =
|
||||
new Vector2((pointer.index + negativePointerAmount) * timePointerInterval + 15f - delayDistanceOffset, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 清楚所有指示线
|
||||
/// </summary>
|
||||
private void ClearPointers()
|
||||
{
|
||||
foreach (var pointer in timePointerList)
|
||||
{
|
||||
Destroy(pointer.gameObject);
|
||||
}
|
||||
timePointerList.Clear();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 缩放时间线的展示时间宽度
|
||||
/// </summary>
|
||||
/// <param name="value">增减值</param>
|
||||
public void ChangeSongTimeDistance(float value)
|
||||
{
|
||||
float oldDistance = songTimeDistance;
|
||||
float changedDistance = songTimeDistance + value;
|
||||
float songLength = songInformation.song.length;
|
||||
if (changedDistance < 1 || changedDistance > songLength)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
float finalDistance = 0, finalValue = 0;
|
||||
float superfluousDistance = changedDistance - songLength;
|
||||
if (superfluousDistance > 0)
|
||||
{
|
||||
finalDistance = songLength;
|
||||
finalValue = value - superfluousDistance;
|
||||
}
|
||||
else
|
||||
{
|
||||
finalDistance = changedDistance;
|
||||
finalValue = value;
|
||||
}
|
||||
|
||||
|
||||
songTimeDistance = finalDistance;
|
||||
float proportion = mainTimePointer.anchoredPosition.x /
|
||||
visibleTimePointerArea.rect.width;
|
||||
leftSideSongTime -= finalValue * (proportion);
|
||||
rightSideSongTime += finalValue * (1 - proportion);
|
||||
|
||||
if (leftSideSongTime < -songInformation.delay)
|
||||
{
|
||||
rightSideSongTime += Mathf.Abs(leftSideSongTime);
|
||||
leftSideSongTime = -songInformation.delay;
|
||||
}
|
||||
else if (rightSideSongTime > songLength)
|
||||
{
|
||||
leftSideSongTime -= (rightSideSongTime - songLength);
|
||||
rightSideSongTime = songLength;
|
||||
}
|
||||
|
||||
timePointerInterval = timePointerInterval / finalDistance * oldDistance;
|
||||
UpdatePointers();
|
||||
//UpdateListItems();
|
||||
SetRange(leftSideSongTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/DynamicUI/Timeline/TimePointerModule.cs.meta
Normal file
11
Assets/Scripts/DynamicUI/Timeline/TimePointerModule.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dab236b468fc9494a93c37370df10557
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
17
Assets/Scripts/DynamicUI/Timeline/Timeline.cs
Normal file
17
Assets/Scripts/DynamicUI/Timeline/Timeline.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.Editor
|
||||
{
|
||||
public class Timeline : MonoBehaviour
|
||||
{
|
||||
public float songTime => EditorManager.instance.songInformation.songTime;
|
||||
public float songBeat => EditorManager.instance.songInformation.songBeat;
|
||||
public float beatmapStartTime => -EditorManager.instance.songInformation.delay;
|
||||
public float timePerBeat => 60f / EditorManager.instance.songInformation.bpm;
|
||||
|
||||
public TimePointerModule timePointerModule;
|
||||
public MusicPlayer musicPlayer;
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/DynamicUI/Timeline/Timeline.cs.meta
Normal file
11
Assets/Scripts/DynamicUI/Timeline/Timeline.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aee0e6022210846a7bd6e0e20af73e3f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Scripts/DynamicUI/ToolBar.meta
Normal file
8
Assets/Scripts/DynamicUI/ToolBar.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a1982054ce8d4446bdac8d50130aa21
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
18
Assets/Scripts/DynamicUI/ToolBar/ToolBar.cs
Normal file
18
Assets/Scripts/DynamicUI/ToolBar/ToolBar.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ToolBar : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/DynamicUI/ToolBar/ToolBar.cs.meta
Normal file
11
Assets/Scripts/DynamicUI/ToolBar/ToolBar.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 914dd73ddae7943148ea71537167542b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -9,7 +9,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public override EffectState CheckEffectState()
|
||||
{
|
||||
float songTime = EditorManager.instance.songModule.songTime;
|
||||
float songTime = EditorManager.instance.songInformation.songTime;
|
||||
|
||||
if (songTime < note.exactJudgeTime )
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public override EffectState CheckEffectState()
|
||||
{
|
||||
float songTime = EditorManager.instance.songModule.songTime;
|
||||
float songTime = EditorManager.instance.songInformation.songTime;
|
||||
|
||||
if (songTime < note.exactJudgeTime )
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override EffectState CheckEffectState()
|
||||
{
|
||||
float songTime = EditorManager.instance.songModule.songTime;
|
||||
float songTime = EditorManager.instance.songInformation.songTime;
|
||||
|
||||
if (songTime < note.exactJudgeTime - generateTime)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public override EffectState CheckEffectState()
|
||||
{
|
||||
float songTime = EditorManager.instance.songModule.songTime;
|
||||
float songTime = EditorManager.instance.songInformation.songTime;
|
||||
|
||||
if (songTime < note.exactJudgeTime )
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public override EffectState CheckEffectState()
|
||||
{
|
||||
float songTime = EditorManager.instance.songModule.songTime;
|
||||
float songTime = EditorManager.instance.songInformation.songTime;
|
||||
|
||||
if (songTime < note.exactJudgeTime )
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public override EffectState CheckEffectState()
|
||||
{
|
||||
float songTime = EditorManager.instance.songModule.songTime;
|
||||
float songTime = EditorManager.instance.songInformation.songTime;
|
||||
|
||||
if (songTime < note.exactJudgeTime )
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Ichni.RhythmGame
|
||||
/// </summary>
|
||||
public virtual void UpdateNoteInStaticTrack()
|
||||
{
|
||||
float songTime = EditorManager.instance.songModule.songTime;
|
||||
float songTime = EditorManager.instance.songInformation.songTime;
|
||||
TrackTimeSubmoduleStatic trackTimeSubmoduleStatic = track.trackTimeSubmodule as TrackTimeSubmoduleStatic;
|
||||
|
||||
float startMove = exactJudgeTime - trackTimeSubmoduleStatic.trackTotalTime;
|
||||
@@ -75,7 +75,7 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
}
|
||||
|
||||
float songTime = EditorManager.instance.songModule.songTime;
|
||||
float songTime = EditorManager.instance.songInformation.songTime;
|
||||
|
||||
if (isJudged && songTime < exactJudgeTime)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (timeDurationSubmodule.CheckTimeInDuration(EditorManager.instance.songModule.songTime))
|
||||
if (timeDurationSubmodule.CheckTimeInDuration(EditorManager.instance.songInformation.songTime))
|
||||
{
|
||||
(trackTimeSubmodule as TrackTimeSubmoduleMovable)?.UpdateTrackPart();
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
if (trackPercent.animations.Count > 0)
|
||||
{
|
||||
trackSwitch.UpdateFlexibleInt(EditorManager.instance.songModule.songTime);
|
||||
trackPercent.UpdateFlexibleFloat(EditorManager.instance.songModule.songTime);
|
||||
trackSwitch.UpdateFlexibleInt(EditorManager.instance.songInformation.songTime);
|
||||
trackPercent.UpdateFlexibleFloat(EditorManager.instance.songInformation.songTime);
|
||||
SetPoint();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (track.timeDurationSubmodule.CheckTimeInDuration(EditorManager.instance.songModule.songTime))
|
||||
if (track.timeDurationSubmodule.CheckTimeInDuration(EditorManager.instance.songInformation.songTime))
|
||||
{
|
||||
trackPositioner.SetPercent(trackTimeSubmoduleMovable.headPercent);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
if (trackPercent.animations.Count > 0)
|
||||
{
|
||||
trackPercent.UpdateFlexibleFloat(EditorManager.instance.songModule.songTime);
|
||||
trackPercent.UpdateFlexibleFloat(EditorManager.instance.songInformation.songTime);
|
||||
if (trackPercent.returnType == FlexibleReturnType.MiddleExecuting)
|
||||
{
|
||||
float finalValue = trackPercent.value;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public void UpdateTrackPart()
|
||||
{
|
||||
float songTime = EditorManager.instance.songModule.songTime;
|
||||
float songTime = EditorManager.instance.songInformation.songTime;
|
||||
|
||||
headPercent = GetTrackPercent(songTime);
|
||||
tailPercent = GetTrackPercent(songTime - visibleTrackTimeLength);
|
||||
|
||||
@@ -46,6 +46,21 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Trail
|
||||
{
|
||||
public static void SetAllTrails(bool emitting, bool willClear)
|
||||
{
|
||||
foreach (GameElement x in EditorManager.instance.beatmapContainer.gameElementList)
|
||||
{
|
||||
if (x is Trail t)
|
||||
{
|
||||
t.trailRenderer.emitting = emitting;
|
||||
if(willClear) t.trailRenderer.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class Trail_BM : GameElement_BM
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"value" : {
|
||||
"songName" : "TestSong",
|
||||
"bpm" : 120,
|
||||
"delay" : 0
|
||||
"delay" : 2
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
"com.unity.ide.rider": "3.0.34",
|
||||
"com.unity.ide.visualstudio": "2.0.22",
|
||||
"com.unity.ide.vscode": "1.2.5",
|
||||
"com.unity.inputsystem": "1.11.2",
|
||||
"com.unity.render-pipelines.universal": "14.0.11",
|
||||
"com.unity.test-framework": "1.1.33",
|
||||
"com.unity.textmeshpro": "3.0.7",
|
||||
|
||||
@@ -168,6 +168,15 @@
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.inputsystem": {
|
||||
"version": "1.11.2",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.modules.uielements": "1.0.0"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.mathematics": {
|
||||
"version": "1.2.6",
|
||||
"depth": 1,
|
||||
|
||||
@@ -9,11 +9,12 @@ AudioManager:
|
||||
Doppler Factor: 1
|
||||
Default Speaker Mode: 2
|
||||
m_SampleRate: 0
|
||||
m_DSPBufferSize: 1024
|
||||
m_DSPBufferSize: 512
|
||||
m_VirtualVoiceCount: 512
|
||||
m_RealVoiceCount: 32
|
||||
m_EnableOutputSuspension: 1
|
||||
m_SpatializerPlugin:
|
||||
m_AmbisonicDecoderPlugin:
|
||||
m_DisableAudio: 0
|
||||
m_VirtualizeEffects: 1
|
||||
m_RequestedDSPBufferSize: 0
|
||||
m_RequestedDSPBufferSize: 512
|
||||
|
||||
@@ -831,7 +831,8 @@ PlayerSettings:
|
||||
tvOS: DOTWEEN;UNITY_VISUAL_SCRIPTING;ES3_TMPRO;ES3_UGUI;TextMeshPro
|
||||
additionalCompilerArguments: {}
|
||||
platformArchitecture: {}
|
||||
scriptingBackend: {}
|
||||
scriptingBackend:
|
||||
Standalone: 1
|
||||
il2cppCompilerConfiguration: {}
|
||||
il2cppCodeGeneration: {}
|
||||
managedStrippingLevel:
|
||||
@@ -843,6 +844,7 @@ PlayerSettings:
|
||||
PS5: 1
|
||||
QNX: 1
|
||||
Stadia: 1
|
||||
Standalone: 4
|
||||
VisionOS: 1
|
||||
WebGL: 1
|
||||
Windows Store Apps: 1
|
||||
@@ -934,8 +936,8 @@ PlayerSettings:
|
||||
embeddedLinuxEnableGamepadInput: 1
|
||||
hmiLogStartupTiming: 0
|
||||
hmiCpuConfiguration:
|
||||
apiCompatibilityLevel: 6
|
||||
activeInputHandler: 0
|
||||
apiCompatibilityLevel: 3
|
||||
activeInputHandler: 1
|
||||
windowsGamepadBackendHint: 0
|
||||
cloudProjectId:
|
||||
framebufferDepthMemorylessMode: 0
|
||||
|
||||
Reference in New Issue
Block a user