修改本体,添加CrossTrackPoint兼容层,兼容StaticTrack Hold,为难度选项扩增全屏可选,添加和调整某些谱面
Signed-off-by: TRADER_FOER <lhf190@outlook.com>
This commit is contained in:
@@ -54,9 +54,9 @@ namespace Ichni.RhythmGame
|
||||
(colorB.returnType is FlexibleReturnType.MiddleExecuting || colorB.isSwitchingReturnType) ||
|
||||
(colorA.returnType is FlexibleReturnType.MiddleExecuting || colorA.isSwitchingReturnType))
|
||||
{
|
||||
if(!forceUpdate) 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;
|
||||
((Track)animatedObject).trackRendererSubmodule.SetColor(color, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -71,13 +71,13 @@ namespace Ichni.RhythmGame
|
||||
foreach (var item in colorB.animations) item.ApplyTimeOffset(offset);
|
||||
foreach (var item in colorA.animations) item.ApplyTimeOffset(offset);
|
||||
}
|
||||
|
||||
|
||||
public override void Refresh()
|
||||
{
|
||||
base.Refresh();
|
||||
if (colorR.animations.Count == 0 && colorG.animations.Count == 0 && colorB.animations.Count == 0 && colorA.animations.Count == 0)
|
||||
{
|
||||
((Track)animatedObject).trackRendererSubmodule.meshGenerator.color = Color.white;
|
||||
((Track)animatedObject).trackRendererSubmodule.SetColor(Color.white, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -87,4 +87,4 @@ namespace Ichni.RhythmGame
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,16 @@ namespace Ichni.RhythmGame
|
||||
animations = anim;
|
||||
}
|
||||
|
||||
public FlexibleFloat_BM ConvertToBM()
|
||||
{
|
||||
if (animations == null || animations.Count == 0)
|
||||
{
|
||||
return new FlexibleFloat_BM();
|
||||
}
|
||||
|
||||
return new FlexibleFloat_BM(new List<AnimatedFloat>(animations));
|
||||
}
|
||||
|
||||
public void Add(AnimatedFloat animatedFloat)
|
||||
{
|
||||
animations.Add(animatedFloat);
|
||||
|
||||
@@ -44,6 +44,16 @@ namespace Ichni.RhythmGame
|
||||
this.animations = anim;
|
||||
}
|
||||
|
||||
public FlexibleInt_BM ConvertToBM()
|
||||
{
|
||||
if (animations == null || animations.Count == 0)
|
||||
{
|
||||
return new FlexibleInt_BM();
|
||||
}
|
||||
|
||||
return new FlexibleInt_BM(new List<AnimatedInt>(animations));
|
||||
}
|
||||
|
||||
public void Add(AnimatedInt animatedInt)
|
||||
{
|
||||
animations.Add(animatedInt);
|
||||
|
||||
@@ -261,7 +261,7 @@ namespace Ichni.RhythmGame
|
||||
public override void UpdateNoteInStaticTrack(float songTime)
|
||||
{
|
||||
base.UpdateNoteInStaticTrack(songTime);
|
||||
if (noteVisual is INoteVisualHold noteVisualHold) noteVisualHold.UpdateHoldInStaticTrack();
|
||||
if (noteVisual is INoteVisualHold noteVisualHold) noteVisualHold.UpdateHoldInStaticTrack(songTime);
|
||||
}
|
||||
|
||||
public override void SetPerfectPosition()
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
}
|
||||
|
||||
public virtual void UpdateHoldInStaticTrack()
|
||||
public virtual void UpdateHoldInStaticTrack(float songTime)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -28,6 +28,6 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public Hold hold { get; set; }
|
||||
public void UpdateHoldInMovableTrack();
|
||||
public void UpdateHoldInStaticTrack();
|
||||
public void UpdateHoldInStaticTrack(float songTime);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,21 @@ namespace Ichni.RhythmGame
|
||||
SetUV();
|
||||
}
|
||||
|
||||
public void SetColor(Color color, bool forceImmediateRebuild = false)
|
||||
{
|
||||
if (meshGenerator == null) return;
|
||||
|
||||
if (meshGenerator.color != color)
|
||||
{
|
||||
meshGenerator.color = color;
|
||||
}
|
||||
|
||||
if (forceImmediateRebuild && track.trackTimeSubmodule is not TrackTimeSubmoduleMovable)
|
||||
{
|
||||
meshGenerator.RebuildImmediate();
|
||||
}
|
||||
}
|
||||
|
||||
protected void SetMesh()
|
||||
{
|
||||
if (track.trackTimeSubmodule is TrackTimeSubmoduleMovable trackTimeSubmoduleMovable)
|
||||
|
||||
Reference in New Issue
Block a user