@@ -99,7 +99,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
if (colorSubmodule.emissionEnabled)
|
||||
{
|
||||
rend.material.EnableKeyword("_EMISSION_ON");
|
||||
Debug.Log("Enable emission");
|
||||
// Debug.Log("Enable emission");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -107,13 +107,21 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
}
|
||||
|
||||
|
||||
rend.material.EnableKeyword("_USEREDASALPHA_ON");
|
||||
Debug.Log(rend.material.IsKeywordEnabled("_EMISSION_ON") + " " + rend.material.IsKeywordEnabled("_USEREDASALPHA_ON"));
|
||||
|
||||
// Debug.Log(rend.material.IsKeywordEnabled("_EMISSION_ON") + " " + rend.material.IsKeywordEnabled("_USEREDASALPHA_ON"));
|
||||
|
||||
rend.material.SetColor("_BaseColor", colorSubmodule.currentBaseColor);
|
||||
rend.material.SetColor("_EmissionColor", colorSubmodule.GetCurrentEmissionColor());
|
||||
});
|
||||
}
|
||||
public override void AfterInitialize()
|
||||
{
|
||||
base.AfterInitialize();
|
||||
renderers.ForEach(rend =>
|
||||
{
|
||||
rend.material.EnableKeyword("_USEREDASALPHA_ON");
|
||||
});
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
@@ -131,10 +139,10 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
}
|
||||
|
||||
visibleTimeLength.UpdateFlexibleFloat(songTime);
|
||||
if (visibleTimeLength.animations.Count > 0 && EditorManager.instance.musicPlayer.isPlaying)//为的是接口里头那个用来set的
|
||||
if (visibleTimeLength.animations.Count > 0 && EditorManager.instance.musicPlayer.isPlaying && trailRenderer.time != visibleTimeLength.value)//为的是接口里头那个用来set的
|
||||
{
|
||||
// Debug.Log(trailRenderer == null);
|
||||
print($"TrailRenderer time set to {visibleTimeLength.value}");
|
||||
|
||||
trailRenderer.time = visibleTimeLength.value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user