修复
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Lean.Pool;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
{
|
||||
public class DTMRipple : MonoBehaviour, IPoolable
|
||||
{
|
||||
#region [暴露属性字段与关联] Exposed Fields & References
|
||||
public ParticleSystem mainRipple;
|
||||
public ParticleSystem inRipple;
|
||||
public ParticleSystem outRipple;
|
||||
|
||||
private Renderer inRippleRenderer;
|
||||
private Renderer outRippleRenderer;
|
||||
#endregion
|
||||
|
||||
#region [池化生命周期] Pooling Lifecycle
|
||||
public void OnSpawn()
|
||||
{
|
||||
inRippleRenderer = inRipple.GetComponent<Renderer>();
|
||||
outRippleRenderer = outRipple.GetComponent<Renderer>();
|
||||
}
|
||||
|
||||
public void OnDespawn()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region [效果参数设置] Effect Parameters Setting
|
||||
public void SetRippleTime(float time)
|
||||
{
|
||||
ParticleSystem.MainModule inRippleMain = inRipple.main;
|
||||
ParticleSystem.MainModule outRippleMain = outRipple.main;
|
||||
inRippleMain.startLifetime = time;
|
||||
outRippleMain.startLifetime = time;
|
||||
}
|
||||
|
||||
public void SetEmissionColor(Color color)
|
||||
{
|
||||
inRippleRenderer.material.SetColor("_BaseColor", color);
|
||||
outRippleRenderer.material.SetColor("_BaseColor", color);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user