为什么我这边物效只能播放一次呢?PlayerController.cs中设置特效函数:
public override void SetFX(string name,float destroy)
{
GameObject go;
if(fxDic.TryGetValue(name,out go))
{
go.SetActive(true);
timerSvc.AddTimeTask((int tid) =>
{
PECommon.Log("FX Played.");
go.SetActive(false);
}, destroy);
PECommon.Log("FX Found in fxDic");
}
//else
//{
// PECommon.Log("FX was not Found in fxDic");
//}
}
其中调试信息都能输出,就是特效只在第一次能播放。