发现JudgementEffect存在瞬间消失的问题
This commit is contained in:
@@ -404,6 +404,8 @@ namespace Demo.Editor
|
|||||||
Convention.RScript.Variable.CStyle.CScriptRScriptVariableGenerater.GetTypename(typeof(Spline.Type))).Register();
|
Convention.RScript.Variable.CStyle.CScriptRScriptVariableGenerater.GetTypename(typeof(Spline.Type))).Register();
|
||||||
new Convention.RScript.Variable.CStyle.CScriptRScriptVariableGenerater(typeof(IEffectHookObject.InteractiveEffectType), null, null,
|
new Convention.RScript.Variable.CStyle.CScriptRScriptVariableGenerater(typeof(IEffectHookObject.InteractiveEffectType), null, null,
|
||||||
Convention.RScript.Variable.CStyle.CScriptRScriptVariableGenerater.GetTypename(typeof(IEffectHookObject.InteractiveEffectType))).Register();
|
Convention.RScript.Variable.CStyle.CScriptRScriptVariableGenerater.GetTypename(typeof(IEffectHookObject.InteractiveEffectType))).Register();
|
||||||
|
new Convention.RScript.Variable.CStyle.CScriptRScriptVariableGenerater(typeof(IInteraction.JudgementLevel), null, null,
|
||||||
|
Convention.RScript.Variable.CStyle.CScriptRScriptVariableGenerater.GetTypename(typeof(IInteraction.JudgementLevel))).Register();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
|
|||||||
@@ -85,6 +85,15 @@ namespace Demo
|
|||||||
public IEffectHookObject.InteractiveEffectType InteractableScoreInterval => IEffectHookObject.InteractiveEffectType.InteractableScoreInterval;
|
public IEffectHookObject.InteractiveEffectType InteractableScoreInterval => IEffectHookObject.InteractiveEffectType.InteractableScoreInterval;
|
||||||
public IEffectHookObject.InteractiveEffectType InteractableIntervalThatCanScoreBest => IEffectHookObject.InteractiveEffectType.InteractableIntervalThatCanScoreBest;
|
public IEffectHookObject.InteractiveEffectType InteractableIntervalThatCanScoreBest => IEffectHookObject.InteractiveEffectType.InteractableIntervalThatCanScoreBest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class IInteractionJudgementLevelInstance
|
||||||
|
{
|
||||||
|
public static IInteractionJudgementLevelInstance instance = new();
|
||||||
|
public IInteraction.JudgementLevel Bad => IInteraction.JudgementLevel.Bad;
|
||||||
|
public IInteraction.JudgementLevel ScoreLevel => IInteraction.JudgementLevel.ScoreLevel;
|
||||||
|
public IInteraction.JudgementLevel None => IInteraction.JudgementLevel.None;
|
||||||
|
public IInteraction.JudgementLevel BestLevel => IInteraction.JudgementLevel.BestLevel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial class ScriptableObject : IScriptableObject
|
public partial class ScriptableObject : IScriptableObject
|
||||||
@@ -509,7 +518,9 @@ namespace Demo
|
|||||||
{ $"Spline{nameof(Spline.Type)}",
|
{ $"Spline{nameof(Spline.Type)}",
|
||||||
new() { data = PrivateType.SplineTypeInstance.instance, type = typeof(PrivateType.SplineTypeInstance)} },
|
new() { data = PrivateType.SplineTypeInstance.instance, type = typeof(PrivateType.SplineTypeInstance)} },
|
||||||
{ nameof(IEffectHookObject.InteractiveEffectType),
|
{ nameof(IEffectHookObject.InteractiveEffectType),
|
||||||
new() { data = PrivateType.IEffectHookObjectInstance.instance, type = typeof(PrivateType.IEffectHookObjectInstance)} }
|
new() { data = PrivateType.IEffectHookObjectInstance.instance, type = typeof(PrivateType.IEffectHookObjectInstance)} },
|
||||||
|
{ nameof(IInteraction.JudgementLevel),
|
||||||
|
new() { data = PrivateType.IInteractionJudgementLevelInstance.instance, type = typeof(PrivateType.IInteractionJudgementLevelInstance) } }
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var ir in engine.RunAsync(script, importClass, variables).Yield())
|
foreach (var ir in engine.RunAsync(script, importClass, variables).Yield())
|
||||||
|
|||||||
@@ -26,15 +26,13 @@ namespace Demo.Game
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载预制体作为子物体
|
/// 加载预制体作为子物体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="level">正整数, 0级判定为最佳判定, 判定等级对应会出现的粒子效果</param>
|
/// <param name="level">设置的判定效果对应的等级</param>
|
||||||
/// <param name="ab"></param>
|
/// <param name="ab"></param>
|
||||||
/// <param name="prefab"></param>
|
/// <param name="prefab"></param>
|
||||||
/// <param name="duration">判定效果会现形的持续时间</param>
|
/// <param name="duration">判定效果会现形的持续时间</param>
|
||||||
[Convention.RScript.Variable.Attr.Method]
|
[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;
|
AssetBundle assetBundle = null;
|
||||||
yield return this.LoadAssetBundle(ab, x => assetBundle = x);
|
yield return this.LoadAssetBundle(ab, x => assetBundle = x);
|
||||||
var req = assetBundle.LoadAssetAsync<GameObject>(prefab);
|
var req = assetBundle.LoadAssetAsync<GameObject>(prefab);
|
||||||
@@ -44,7 +42,7 @@ namespace Demo.Game
|
|||||||
Prefabs.Add(levelId, sub);
|
Prefabs.Add(levelId, sub);
|
||||||
sub.transform.SetParent(transform);
|
sub.transform.SetParent(transform);
|
||||||
AssetBundles.Add(levelId, ab);
|
AssetBundles.Add(levelId, ab);
|
||||||
Durations.Add(levelId, float.Parse(duration));
|
Durations.Add(levelId, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateParticle(GameObject prefab)
|
private void CreateParticle(GameObject prefab)
|
||||||
|
|||||||
Reference in New Issue
Block a user