发现JudgementEffect存在瞬间消失的问题
This commit is contained in:
@@ -26,15 +26,13 @@ namespace Demo.Game
|
||||
/// <summary>
|
||||
/// 加载预制体作为子物体
|
||||
/// </summary>
|
||||
/// <param name="level">正整数, 0级判定为最佳判定, 判定等级对应会出现的粒子效果</param>
|
||||
/// <param name="level">设置的判定效果对应的等级</param>
|
||||
/// <param name="ab"></param>
|
||||
/// <param name="prefab"></param>
|
||||
/// <param name="duration">判定效果会现形的持续时间</param>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public IEnumerator Load(string level, string ab, string prefab, string duration)
|
||||
public IEnumerator Load(IInteraction.JudgementLevel levelId, string ab, string prefab, float duration)
|
||||
{
|
||||
var levelId = (IInteraction.JudgementLevel)int.Parse(level);
|
||||
|
||||
AssetBundle assetBundle = null;
|
||||
yield return this.LoadAssetBundle(ab, x => assetBundle = x);
|
||||
var req = assetBundle.LoadAssetAsync<GameObject>(prefab);
|
||||
@@ -44,7 +42,7 @@ namespace Demo.Game
|
||||
Prefabs.Add(levelId, sub);
|
||||
sub.transform.SetParent(transform);
|
||||
AssetBundles.Add(levelId, ab);
|
||||
Durations.Add(levelId, float.Parse(duration));
|
||||
Durations.Add(levelId, duration);
|
||||
}
|
||||
|
||||
private void CreateParticle(GameObject prefab)
|
||||
|
||||
Reference in New Issue
Block a user