1.修复了一些错误\n2.导入了URP的Sample

This commit is contained in:
2025-10-02 22:19:52 +08:00
parent a77faec0fa
commit 1ecb1b0ba4
558 changed files with 147322 additions and 39 deletions

View File

@@ -13,9 +13,9 @@ namespace Demo.Game
}
private List<IEnumerator> AssetBundleLoadings = new();
[Content, SerializeField] private Dictionary<int, string> AssetBundles = new();
[Content, SerializeField] private Dictionary<int, GameObject> Prefabs = new();
[Content, SerializeField] private Dictionary<int, float> Durations = new();
[Content, SerializeField] private Dictionary<IInteraction.JudgementLevel, string> AssetBundles = new();
[Content, SerializeField] private Dictionary<IInteraction.JudgementLevel, GameObject> Prefabs = new();
[Content, SerializeField] private Dictionary<IInteraction.JudgementLevel, float> Durations = new();
public override IEnumerator LoadScript(string script)
{
@@ -34,22 +34,22 @@ namespace Demo.Game
/// <summary>
/// 加载预制体作为子物体
/// </summary>
/// <param name="level">判定等级对应会出现的粒子效果,若没有对应的则向更低的值寻找</param>
/// <param name="level">正整数, 0级判定为最佳判定, 判定等级对应会出现的粒子效果</param>
/// <param name="ab"></param>
/// <param name="prefab"></param>
/// <param name="duration">判定效果的持续时间</param>
/// <param name="duration">判定效果会现形的持续时间</param>
[ScriptableCall(@"
<summary>
加载预制体作为子物体
</summary>
<param name=""level"">判定等级对应会出现的粒子效果,若没有对应的则向更低的值寻找</param>
<param name=""level"">正整数, 0级判定为最佳判定, 判定等级对应会出现的粒子效果</param>
<param name=""ab""></param>
<param name=""prefab""></param>
<param name=""duration"">判定效果的持续时间</param>
<param name=""duration"">判定效果会现形的持续时间</param>
")]
public void Load(string level, string ab, string prefab, string duration)
{
int levelId = int.Parse(level);
var levelId = (IInteraction.JudgementLevel)int.Parse(level);
IEnumerator Foo()
{
@@ -79,17 +79,14 @@ namespace Demo.Game
prefab.SetActive(false);
}
public override void OnJudgement(int level)
public override void OnJudgement(IInteraction.JudgementLevel level)
{
for (int i = level; i >= 0; i--)
if (Prefabs.TryGetValue(level, out var effect))
{
if (Prefabs.TryGetValue(i, out var effect))
{
ConventionUtility.CreateSteps()
.Next(() => CreateParticle(effect))
.Wait(Durations[i], () => DestroyParticle(effect))
.Invoke();
}
ConventionUtility.CreateSteps()
.Next(() => CreateParticle(effect))
.Wait(Durations[level], () => DestroyParticle(effect))
.Invoke();
}
}
}