@@ -27,7 +27,8 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
public float enableProcessTime = 0.5f; // headPoint,headCircle的启用/禁用过程时间,默认为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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user