尝试更改hitpoint

Signed-off-by: TRADER_FOER <lhf190@outlook.com>
This commit is contained in:
2026-07-07 12:13:42 +08:00
parent eedbe9d41f
commit 67320b445f
16 changed files with 18702 additions and 20369 deletions

View File

@@ -27,7 +27,8 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public float enableProcessTime = 0.5f; // headPointheadCircle的启用/禁用过程时间默认为0.5秒启用完成后sparks开启禁用开始时sparks关闭。
public float headSize = 1f; // headPoint和headCircle的目标大小默认为1。
public FlexibleFloat headRotateSpeed; // headCircle的旋转速度(Particle.rotationOverLifetime的angular velocity)
private float _ChachedAngle;
private ParticleSystem _HitPoint;
public Material EffectMaterial;
float IHaveTrail.visibleTimeLength
@@ -124,6 +125,10 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
sparks.gameObject.SetActive(false);
headPoint.transform.localScale = Vector3.zero;
headCircle.transform.localScale = Vector3.zero;
if (headPoint != null)
{
_HitPoint = headPoint.GetComponent<ParticleSystem>();
}
}
/// <summary>
@@ -164,11 +169,15 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
if (headPoint != null)
{
var ps = headPoint.GetComponent<ParticleSystem>();
if (ps != null)
_HitPoint = headPoint.GetComponent<ParticleSystem>();
if (_HitPoint != null)
{
var main = ps.main;
main.startColor = desaturatedColor;
var main = _HitPoint.main;
//main.startColor = desaturatedColor;
var col = _HitPoint.colorOverLifetime;
col.enabled = true;
col.color = new ParticleSystem.MinMaxGradient(desaturatedColor, desaturatedColor);
}
}
@@ -262,7 +271,14 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
DisableHead();
isHeadEnabled = false;
}
headRotateSpeed.UpdateFlexibleFloat(songTime);
// _ChachedAngle += headRotateSpeed.value;
if (_HitPoint != null)
{
var rot = _HitPoint.rotationOverLifetime;
rot.enabled = true;
rot.z = headRotateSpeed.value;
}
visibleTimeLength.UpdateFlexibleFloat(songTime);
if (visibleTimeLength.animations.Count > 0 && EditorManager.instance.musicPlayer.isPlaying && trailRenderer.time != visibleTimeLength.value)
{