This commit is contained in:
SoulliesOfficial
2026-04-03 10:53:11 -04:00
parent e7b890686d
commit 1bc9af280b
177 changed files with 4029 additions and 3302 deletions

View File

@@ -30,9 +30,9 @@ namespace Ichni.RhythmGame
// 【新增】受管家管控
GameManager.Instance.animationManager.RegisterAnimation(this);
float delay = GameManager.Instance.songInformation.delay;
if (timeDurationSubmodule.CheckTimeInDuration(delay))
if (timeDurationSubmodule.CheckTimeInDuration(-delay))
{
UpdateAnimation(0f); // 确保与最新的 SongTime 同步
ManualUpdate(-delay, true);
}
}
@@ -40,13 +40,13 @@ namespace Ichni.RhythmGame
/// 更新动画
/// </summary>
/// <param name="songTime">歌曲时间</param>
protected abstract void UpdateAnimation(float songTime);
protected abstract void UpdateAnimation(float songTime, bool forceUpdate);
public virtual void ManualUpdate(float currentSongTime)
public virtual void ManualUpdate(float currentSongTime, bool forceUpdate = false)
{
if (timeDurationSubmodule.CheckTimeInDuration(currentSongTime))
{
UpdateAnimation(currentSongTime);
UpdateAnimation(currentSongTime, forceUpdate);
}
if (timeDurationSubmodule.CheckAfterEndTime(currentSongTime))

View File

@@ -37,11 +37,11 @@ namespace Ichni.RhythmGame
#endregion
#region [] Core Animation Logic
protected override void UpdateAnimation(float songTime)
protected override void UpdateAnimation(float songTime, bool forceUpdate)
{
fieldOfView.UpdateFlexibleFloat(songTime);
if (fieldOfView.returnType == FlexibleReturnType.MiddleExecuting)
if (forceUpdate || fieldOfView.returnType == FlexibleReturnType.MiddleExecuting)
{
targetGameCamera.perspectiveAngle = fieldOfView.value;
targetGameCamera.cam.fieldOfView = fieldOfView.value;

View File

@@ -45,19 +45,19 @@ namespace Ichni.RhythmGame
#endregion
#region [] Core Animation Logic
protected override void UpdateAnimation(float songTime)
protected override void UpdateAnimation(float songTime, bool forceUpdate)
{
colorR.UpdateFlexibleFloat(songTime);
colorG.UpdateFlexibleFloat(songTime);
colorB.UpdateFlexibleFloat(songTime);
colorA.UpdateFlexibleFloat(songTime);
if ((colorR.returnType is FlexibleReturnType.MiddleExecuting || colorR.isSwitchingReturnType) ||
if (forceUpdate || (colorR.returnType is FlexibleReturnType.MiddleExecuting || colorR.isSwitchingReturnType) ||
(colorG.returnType is FlexibleReturnType.MiddleExecuting || colorG.isSwitchingReturnType) ||
(colorB.returnType is FlexibleReturnType.MiddleExecuting || colorB.isSwitchingReturnType) ||
(colorA.returnType is FlexibleReturnType.MiddleExecuting || colorA.isSwitchingReturnType))
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
if(!forceUpdate) animationReturnType = FlexibleReturnType.MiddleExecuting;
targetColorSubmodule.currentBaseColor = new Color(colorR.value, colorG.value, colorB.value, colorA.value);
targetColorSubmodule.baseColorDirtyMark = true;

View File

@@ -44,7 +44,7 @@ namespace Ichni.RhythmGame
#endregion
#region [] Core Animation Logic
protected override void UpdateAnimation(float songTime)
protected override void UpdateAnimation(float songTime, bool forceUpdate)
{
colorR.UpdateFlexibleFloat(songTime);
colorG.UpdateFlexibleFloat(songTime);
@@ -56,7 +56,7 @@ namespace Ichni.RhythmGame
(colorB.returnType is FlexibleReturnType.MiddleExecuting || colorB.isSwitchingReturnType) ||
(colorI.returnType is FlexibleReturnType.MiddleExecuting || colorI.isSwitchingReturnType))
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
if(!forceUpdate) animationReturnType = FlexibleReturnType.MiddleExecuting;
targetColorSubmodule.currentEmissionColor = new Color(colorR.value, colorG.value, colorB.value, 1);
targetColorSubmodule.currentEmissionIntensity = colorI.value;

View File

@@ -103,7 +103,7 @@ namespace Ichni.RhythmGame
#endregion
#region [] Core Animation Logic
protected override void UpdateAnimation(float songTime)
protected override void UpdateAnimation(float songTime, bool forceUpdate)
{
if (targetComponent == null) return;

View File

@@ -102,7 +102,7 @@ namespace Ichni.RhythmGame
#endregion
#region [] Core Animation Logic
protected override void UpdateAnimation(float songTime)
protected override void UpdateAnimation(float songTime, bool forceUpdate)
{
if (targetComponent == null || propertyValue == null || propertyValue.animations.Count == 0) return;

View File

@@ -102,7 +102,7 @@ namespace Ichni.RhythmGame
#endregion
#region [] Core Animation Logic
protected override void UpdateAnimation(float songTime)
protected override void UpdateAnimation(float songTime, bool forceUpdate)
{
if (targetComponent == null) return;

View File

@@ -44,19 +44,19 @@ namespace Ichni.RhythmGame
#endregion
#region [] Core Animation Logic
protected override void UpdateAnimation(float songTime)
protected override void UpdateAnimation(float songTime, bool forceUpdate)
{
colorR.UpdateFlexibleFloat(songTime);
colorG.UpdateFlexibleFloat(songTime);
colorB.UpdateFlexibleFloat(songTime);
colorA.UpdateFlexibleFloat(songTime);
if ((colorR.returnType is FlexibleReturnType.MiddleExecuting || colorR.isSwitchingReturnType) ||
if (forceUpdate || (colorR.returnType is FlexibleReturnType.MiddleExecuting || colorR.isSwitchingReturnType) ||
(colorG.returnType is FlexibleReturnType.MiddleExecuting || colorG.isSwitchingReturnType) ||
(colorB.returnType is FlexibleReturnType.MiddleExecuting || colorB.isSwitchingReturnType) ||
(colorA.returnType is FlexibleReturnType.MiddleExecuting || colorA.isSwitchingReturnType))
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
if(!forceUpdate) animationReturnType = FlexibleReturnType.MiddleExecuting;
Color color = new Color(colorR.value, colorG.value, colorB.value, colorA.value);
((Track)animatedObject).trackRendererSubmodule.meshGenerator.color = color;
}
@@ -83,7 +83,7 @@ namespace Ichni.RhythmGame
}
else
{
UpdateAnimation(CoreServices.TimeProvider.SongTime);
UpdateAnimation(CoreServices.TimeProvider.SongTime, false);
}
}
#endregion

View File

@@ -37,7 +37,7 @@ namespace Ichni.RhythmGame
#endregion
#region [] Core Animation Logic
protected override void UpdateAnimation(float songTime)
protected override void UpdateAnimation(float songTime, bool forceUpdate)
{
totalTime.UpdateFlexibleFloat(songTime);

View File

@@ -39,17 +39,17 @@ namespace Ichni.RhythmGame
#endregion
#region [] Core Animation Logic
protected override void UpdateAnimation(float songTime)
protected override void UpdateAnimation(float songTime, bool forceUpdate)
{
positionX.UpdateFlexibleFloat(songTime);
positionY.UpdateFlexibleFloat(songTime);
positionZ.UpdateFlexibleFloat(songTime);
if (positionX.returnType is FlexibleReturnType.MiddleExecuting ||
if (forceUpdate || positionX.returnType is FlexibleReturnType.MiddleExecuting ||
positionY.returnType is FlexibleReturnType.MiddleExecuting ||
positionZ.returnType is FlexibleReturnType.MiddleExecuting)
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
if(!forceUpdate) animationReturnType = FlexibleReturnType.MiddleExecuting;
Vector3 currentPosition = new Vector3(positionX.value, positionY.value, positionZ.value);
targetTransformSubmodule.positionOffset += currentPosition;
targetTransformSubmodule.positionDirtyMark = true;

View File

@@ -33,9 +33,7 @@ namespace Ichni.RhythmGame
look.targetGameElement = lookAtTarget;
look.targetTransformSubmodule = (animatedObject as IHaveTransformSubmodule).transformSubmodule;
//look.timeDurationSubmodule.SetDuration(-999f, 999f); //TODO: 换为(-delay, songLength)
return look;
}
@@ -43,6 +41,12 @@ namespace Ichni.RhythmGame
{
timeDurationSubmodule = new TimeDurationSubmodule(this);
}
public override void AfterInitialize()
{
base.AfterInitialize();
}
#endregion
#region [] Core Animation Logic
@@ -54,7 +58,7 @@ namespace Ichni.RhythmGame
}
}
protected override void UpdateAnimation(float songTime)
protected override void UpdateAnimation(float songTime, bool forceUpdate)
{
if (targetGameElement is null) return;
@@ -64,7 +68,7 @@ namespace Ichni.RhythmGame
{
targetTransformSubmodule.eulerAnglesOffsetLock = enabling.value;
}
if (enabling.value)
{
animationReturnType = FlexibleReturnType.MiddleExecuting;

View File

@@ -42,17 +42,18 @@ namespace Ichni.RhythmGame
#endregion
#region [] Core Animation Logic
protected override void UpdateAnimation(float songTime)
protected override void UpdateAnimation(float songTime, bool forceUpdate)
{
scaleX.UpdateFlexibleFloat(songTime);
scaleY.UpdateFlexibleFloat(songTime);
scaleZ.UpdateFlexibleFloat(songTime);
if (scaleX.returnType is FlexibleReturnType.MiddleExecuting ||
if (forceUpdate || scaleX.returnType is FlexibleReturnType.MiddleExecuting ||
scaleY.returnType is FlexibleReturnType.MiddleExecuting ||
scaleZ.returnType is FlexibleReturnType.MiddleExecuting)
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
if(!forceUpdate) animationReturnType = FlexibleReturnType.MiddleExecuting;
Vector3 currentScale = new Vector3(scaleX.value, scaleY.value, scaleZ.value);
targetTransformSubmodule.scaleOffset += currentScale;
targetTransformSubmodule.scaleDirtyMark = true;

View File

@@ -37,17 +37,17 @@ namespace Ichni.RhythmGame
#endregion
#region [] Core Animation Logic
protected override void UpdateAnimation(float songTime)
protected override void UpdateAnimation(float songTime, bool forceUpdate)
{
eulerAngleX.UpdateFlexibleFloat(songTime);
eulerAngleY.UpdateFlexibleFloat(songTime);
eulerAngleZ.UpdateFlexibleFloat(songTime);
if (eulerAngleX.returnType is FlexibleReturnType.MiddleExecuting ||
if (forceUpdate || eulerAngleX.returnType is FlexibleReturnType.MiddleExecuting ||
eulerAngleY.returnType is FlexibleReturnType.MiddleExecuting ||
eulerAngleZ.returnType is FlexibleReturnType.MiddleExecuting)
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
if(!forceUpdate) animationReturnType = FlexibleReturnType.MiddleExecuting;
Vector3 currentEulerAngles = new Vector3(eulerAngleX.value, eulerAngleY.value, eulerAngleZ.value);
targetTransformSubmodule.eulerAnglesOffset += currentEulerAngles;
targetTransformSubmodule.eulerAnglesDirtyMark = true;