diff --git a/Assets/Materials/General/DefaultLitTransparent.mat b/Assets/Materials/General/DefaultLitTransparent.mat
index de15ef7a..f8279719 100644
--- a/Assets/Materials/General/DefaultLitTransparent.mat
+++ b/Assets/Materials/General/DefaultLitTransparent.mat
@@ -11,19 +11,15 @@ Material:
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
- m_ValidKeywords:
- - _ALPHAPREMULTIPLY_ON
- - _SURFACE_TYPE_TRANSPARENT
+ m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
- m_CustomRenderQueue: 3000
+ m_CustomRenderQueue: 2000
stringTagMap:
- RenderType: Transparent
- disabledShaderPasses:
- - DepthOnly
- - SHADOWCASTER
+ RenderType: Opaque
+ disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@@ -97,8 +93,8 @@ Material:
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- - _DstBlend: 10
- - _DstBlendAlpha: 10
+ - _DstBlend: 0
+ - _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
@@ -113,9 +109,9 @@ Material:
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- - _Surface: 1
+ - _Surface: 0
- _WorkflowMode: 1
- - _ZWrite: 0
+ - _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
diff --git a/Assets/Scenes/StartMenu.unity b/Assets/Scenes/StartMenu.unity
index 93af63bf..e2a3e64f 100644
--- a/Assets/Scenes/StartMenu.unity
+++ b/Assets/Scenes/StartMenu.unity
@@ -14322,7 +14322,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 4337614255116277774}
m_HandleRect: {fileID: 4337614255116277775}
m_Direction: 2
- m_Value: 0
+ m_Value: 1
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
diff --git a/Assets/Scripts/EditorGame/GameElements/Notes/NoteObjects/NoteBase.cs b/Assets/Scripts/EditorGame/GameElements/Notes/NoteObjects/NoteBase.cs
index ccdd7494..e9b21231 100644
--- a/Assets/Scripts/EditorGame/GameElements/Notes/NoteObjects/NoteBase.cs
+++ b/Assets/Scripts/EditorGame/GameElements/Notes/NoteObjects/NoteBase.cs
@@ -36,7 +36,8 @@ namespace Ichni.RhythmGame
///
public virtual void UpdateNoteInMovableTrack()
{
- trackPositioner.SetPercent((track.trackTimeSubmodule as TrackTimeSubmoduleMovable).GetTrackPercent(exactJudgeTime));
+ TrackTimeSubmoduleMovable trackTimeSubmoduleMovable = track.trackTimeSubmodule as TrackTimeSubmoduleMovable;
+ trackPositioner.SetPercent(trackTimeSubmoduleMovable.GetTrackPercent(exactJudgeTime));
}
///
diff --git a/Assets/Scripts/EditorGame/GameElements/Track/TrackSubmodules/TrackPathSubmodule.cs b/Assets/Scripts/EditorGame/GameElements/Track/TrackSubmodules/TrackPathSubmodule.cs
index f510e89c..6b7759e1 100644
--- a/Assets/Scripts/EditorGame/GameElements/Track/TrackSubmodules/TrackPathSubmodule.cs
+++ b/Assets/Scripts/EditorGame/GameElements/Track/TrackSubmodules/TrackPathSubmodule.cs
@@ -42,7 +42,7 @@ namespace Ichni.RhythmGame
this.trackDisplay.spline = path;
this.trackDisplay.size = 0.1f;
- this.trackDisplay.gameObject.SetActive(isShowingDisplay);
+ this.SetDisplay(isShowingDisplay);
}
}
@@ -77,6 +77,13 @@ namespace Ichni.RhythmGame
{
path.SetPoint(point.index, point.node, SplineComputer.Space.Local);
}
+
+
+ public void SetDisplay(bool isShowing)
+ {
+ this.isShowingDisplay = isShowing;
+ trackDisplay.gameObject.SetActive(isShowing);
+ }
}
public partial class TrackPathSubmodule
@@ -103,7 +110,7 @@ namespace Ichni.RhythmGame
});
var showDisplayToggle = inspector.GenerateToggle(this, container, "Show Display", nameof(isShowingDisplay));
- showDisplayToggle.AddListenerFunction(_ => trackDisplay.gameObject.SetActive(isShowingDisplay));
+ showDisplayToggle.AddListenerFunction(_ => SetDisplay(isShowingDisplay));
}
}
diff --git a/Assets/Scripts/EditorGame/GameElements/Track/TrackSubmodules/TrackTimeSubmodule.cs b/Assets/Scripts/EditorGame/GameElements/Track/TrackSubmodules/TrackTimeSubmodule.cs
index f9a5d19f..348633a9 100644
--- a/Assets/Scripts/EditorGame/GameElements/Track/TrackSubmodules/TrackTimeSubmodule.cs
+++ b/Assets/Scripts/EditorGame/GameElements/Track/TrackSubmodules/TrackTimeSubmodule.cs
@@ -58,8 +58,7 @@ namespace Ichni.RhythmGame
public float GetTrackPercent(float songTimeInTime)
{
- float per = AnimationCurveEvaluator.Evaluate(animationCurveType,
- (songTimeInTime - trackStartTime) / trackTotalTime);
+ float per = AnimationCurveEvaluator.Evaluate(animationCurveType, (songTimeInTime - trackStartTime) / trackTotalTime);
return Mathf.Clamp01(per);
}
diff --git a/Assets/Scripts/EditorGame/GameElements/Track/TrackTools.cs b/Assets/Scripts/EditorGame/GameElements/Track/TrackTools.cs
index 61b2d0da..360f79b7 100644
--- a/Assets/Scripts/EditorGame/GameElements/Track/TrackTools.cs
+++ b/Assets/Scripts/EditorGame/GameElements/Track/TrackTools.cs
@@ -149,7 +149,7 @@ namespace Ichni.RhythmGame
/// 批量开启或关闭所有PathNode的Sphere显示
///
///
- private void SetAllPathNodeSphere(bool isShowing)
+ public void SetAllPathNodeSphere(bool isShowing)
{
trackPathSubmodule.pathNodeList.ForEach(pn => pn.SetPathNodeSphere(isShowing));
}
diff --git a/Assets/Scripts/Manager/InputListener.cs b/Assets/Scripts/Manager/InputListener.cs
index a34d0c5e..f8993e2c 100644
--- a/Assets/Scripts/Manager/InputListener.cs
+++ b/Assets/Scripts/Manager/InputListener.cs
@@ -1,6 +1,8 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Linq;
+using Ichni.RhythmGame;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem;
@@ -11,57 +13,102 @@ namespace Ichni.Editor
public partial class InputListener : MonoBehaviour
{
private PointerEventData pointerEventData;
+ private bool isPointerOverUI;
+ private GameObject hoveredUI;
public EventSystem eventSystem;
public List graphicRaycasters;
-
+
+ private void Start()
+ {
+ sceneCameraTransform = EditorManager.instance.cameraManager.sceneCamera.transform;
+ }
+
private void Update()
{
- bool isPointerOverUI = IsPointerOverUI(out GameObject hoveredUI);
-
- if (EditorManager.instance.cameraManager.isSceneCameraActive &&
- !Keyboard.current.leftCtrlKey.isPressed && !isPointerOverUI) // 场景相机的移动和旋转
+ isPointerOverUI = IsPointerOverUI(out hoveredUI);
+
+ SceneCameraOperation();
+ MusicPlayerOperation();
+ TracksOperation();
+ SaveAndExportOperation();
+ CopyPasteDeleteOperation();
+ ResolutionHintsOperation();
+ UIOperation();
+ SwitchCameraOperation();
+ }
+ }
+
+ public partial class InputListener
+ {
+ private bool isRotatingSceneCamera;
+ private Transform sceneCameraTransform;
+
+ private void SceneCameraOperation()
+ {
+ if (Keyboard.current.ctrlKey.isPressed || Keyboard.current.altKey.isPressed || Keyboard.current.shiftKey.isPressed)
+ {
+ return;
+ }
+
+ if (EditorManager.instance.cameraManager.isSceneCameraActive && !isPointerOverUI) // 场景相机的移动和旋转
{
float cameraMoveSpeed = EditorManager.instance.cameraManager.sceneCameraMoveSpeed * Time.deltaTime;
- Transform sceneCameraTransform = EditorManager.instance.cameraManager.sceneCamera.transform;
+
if (Keyboard.current.wKey.isPressed)
{
sceneCameraTransform.position += sceneCameraTransform.forward * cameraMoveSpeed;
}
+
if (Keyboard.current.sKey.isPressed)
{
sceneCameraTransform.position -= sceneCameraTransform.forward * cameraMoveSpeed;
}
+
if (Keyboard.current.dKey.isPressed)
{
sceneCameraTransform.position += sceneCameraTransform.right * cameraMoveSpeed;
}
+
if (Keyboard.current.aKey.isPressed)
{
sceneCameraTransform.position -= sceneCameraTransform.right * cameraMoveSpeed;
}
+
if (Keyboard.current.eKey.isPressed)
{
sceneCameraTransform.position += sceneCameraTransform.up * cameraMoveSpeed;
}
+
if (Keyboard.current.qKey.isPressed)
{
sceneCameraTransform.position -= sceneCameraTransform.up * cameraMoveSpeed;
}
+ }
- if (Mouse.current.rightButton.isPressed && !isPointerOverUI)
+ if (EditorManager.instance.cameraManager.isSceneCameraActive)
+ {
+ if (Mouse.current.rightButton.wasPressedThisFrame && !isPointerOverUI)
{
- float cameraRotateSpeed = EditorManager.instance.cameraManager.sceneCameraRotateSpeed * Time.deltaTime;
- Vector2 mouseDelta = Mouse.current.delta.ReadValue();
- sceneCameraTransform.Rotate(Vector3.up, -mouseDelta.x * cameraRotateSpeed, Space.World);
- sceneCameraTransform.Rotate(sceneCameraTransform.right, mouseDelta.y * cameraRotateSpeed, Space.World);
+ isRotatingSceneCamera = true;
}
- else if (isPointerOverUI)
+ else if (Mouse.current.rightButton.wasReleasedThisFrame)
{
-
+ isRotatingSceneCamera = false;
}
}
- if (!isPointerOverUI && Keyboard.current.enterKey.wasPressedThisFrame) // 播放或暂停音乐
+ if (isRotatingSceneCamera)
+ {
+ float cameraRotateSpeed = EditorManager.instance.cameraManager.sceneCameraRotateSpeed * Time.deltaTime;
+ Vector2 mouseDelta = Mouse.current.delta.ReadValue();
+ sceneCameraTransform.Rotate(Vector3.up, -mouseDelta.x * cameraRotateSpeed, Space.World);
+ sceneCameraTransform.Rotate(sceneCameraTransform.right, mouseDelta.y * cameraRotateSpeed, Space.World);
+ }
+ }
+
+ private void MusicPlayerOperation()
+ {
+ if (Keyboard.current.enterKey.wasPressedThisFrame && !isPointerOverUI) // 回车键 播放或暂停音乐
{
if (!EditorManager.instance.musicPlayer.isPlaying)
{
@@ -72,63 +119,103 @@ namespace Ichni.Editor
EditorManager.instance.musicPlayer.PauseMusic();
}
}
-
-
- if (Keyboard.current.leftCtrlKey.isPressed) // 快捷键
+ }
+
+ private void TracksOperation()
+ {
+ if (Keyboard.current.altKey.isPressed)
{
- // 保存和导出
- if (Keyboard.current.sKey.wasPressedThisFrame)
+ if (Keyboard.current.pKey.wasPressedThisFrame) // Alt + P 显示或隐藏所有路径节点
+ {
+ List