Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
2025-10-02 14:01:23 +08:00
parent b29654e423
commit 529ab31282
21 changed files with 1081861 additions and 21597 deletions

View File

@@ -11,7 +11,7 @@ namespace Ichni.RhythmGame
{
public FlexibleFloat fieldOfView;
public GameCamera targetGameCamera;
public static CameraFieldOfView GenerateElement(string elementName, Guid id,
List<string> tags, bool isFirstGenerated, GameCamera gameCamera, FlexibleFloat fieldOfView)
{
@@ -21,13 +21,13 @@ namespace Ichni.RhythmGame
camFOV.animatedObject = gameCamera;
camFOV.targetGameCamera = gameCamera;
camFOV.fieldOfView = fieldOfView;
camFOV.animationReturnType = FlexibleReturnType.Before;
return camFOV;
}
public override void SetDefaultSubmodules()
{
timeDurationSubmodule = new TimeDurationSubmodule(this);
@@ -42,8 +42,29 @@ namespace Ichni.RhythmGame
targetGameCamera.perspectiveAngle = fieldOfView.value;
targetGameCamera.gameCamera.fieldOfView = fieldOfView.value;
}
else if (fieldOfView.isSwitchingReturnType)
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
targetGameCamera.perspectiveAngle = fieldOfView.value;
targetGameCamera.gameCamera.fieldOfView = fieldOfView.value;
}
else
{
if (!EditorManager.instance.musicPlayer.isPlaying && animationReturnType != FlexibleReturnType.MiddleInterval)
{
targetGameCamera.perspectiveAngle = fieldOfView.value;
targetGameCamera.gameCamera.fieldOfView = fieldOfView.value;
animationReturnType = FlexibleReturnType.After;
}
else
{
targetGameCamera.perspectiveAngle = fieldOfView.value;
targetGameCamera.gameCamera.fieldOfView = fieldOfView.value;
animationReturnType = FlexibleReturnType.Before;
}
}
}
public override void ApplyTimeOffset(float offset)
{
base.ApplyTimeOffset(offset);
@@ -57,7 +78,7 @@ namespace Ichni.RhythmGame
{
matchedBM = new CameraFieldOfView_BM(elementName, elementGuid, tags, targetGameCamera.matchedBM as GameCamera_BM, fieldOfView.ConvertToBM());
}
public override void SetUpInspector()
{
base.SetUpInspector();
@@ -79,9 +100,9 @@ namespace Ichni.RhythmGame
public CameraFieldOfView_BM()
{
}
public CameraFieldOfView_BM(string elementName, Guid elementGuid, List<string> tags,
GameElement_BM attachedElement, FlexibleFloat_BM fieldOfView)
: base(elementName, elementGuid, tags, attachedElement)
@@ -91,10 +112,10 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
matchedElement = CameraFieldOfView.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid) as GameCamera, fieldOfView.ConvertToGameType());
matchedElement = CameraFieldOfView.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid) as GameCamera, fieldOfView.ConvertToGameType());
}
public override GameElement DuplicateBM(GameElement parent)
{
return CameraFieldOfView.GenerateElement(elementName, Guid.NewGuid(), tags, false,

View File

@@ -18,6 +18,13 @@ namespace Ichni.RhythmGame
public void SelectGameElement()
{
switch (elementToSelect)
{
case NoteBase note when EditorManager.instance.songInformation.songTime > note.exactJudgeTime:
return;
case PathNode pathNode1 when !pathNode1.isShowingSphere:
return;
}
EditorManager.instance.uiManager.hierarchy.FindTab(elementToSelect);
}

View File

@@ -361,6 +361,11 @@ namespace Ichni.RhythmGame
List<BaseElement_BM> result = new List<BaseElement_BM>();
foreach (BaseElement_BM element in clip)
{
if (element == null)
{
continue;
}
if (element.attachedElementGuid == elementGuid)
{
result.Add(element);

View File

@@ -5,6 +5,7 @@ using System.Linq;
using Dreamteck.Splines;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using UniRx;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.InputSystem;
@@ -41,6 +42,13 @@ namespace Ichni.RhythmGame
hold.trackPositioner.updateMethod = SplineUser.UpdateMethod.LateUpdate;
hold.isOnTrack = true;
hold.UpdateNoteInTrack();
Observable.NextFrame().Subscribe(_ =>
{
hold.UpdateNoteInTrack();
track.Refresh();
track.trackPathSubmodule?.path.RebuildImmediate();
});
}
else
{
@@ -59,6 +67,7 @@ namespace Ichni.RhythmGame
}
return hold;
}
}

View File

@@ -67,7 +67,7 @@ namespace Ichni.RhythmGame
public override void Refresh()
{
base.Refresh();
if (noteVisual != null)
{
noteVisual.Refresh();
@@ -91,11 +91,13 @@ namespace Ichni.RhythmGame
if (isFirstJudged && songTime < exactJudgeTime)
{
isFirstJudged = false;
noteVisual.GetComponent<Collider>().enabled = !isFirstJudged;
}
else if (!isFirstJudged && songTime >= exactJudgeTime)
{
noteAudioSubmodule?.PlayNoteJudgeAudios(editor.currentJudgeType);
isFirstJudged = true;
noteVisual.GetComponent<Collider>().enabled = !isFirstJudged;
}
// 判定单元更新
@@ -140,7 +142,7 @@ namespace Ichni.RhythmGame
}
// 碰撞体状态
noteVisual.GetComponent<Collider>().enabled = !isFirstJudged;
}
}