Implement animation.

This commit is contained in:
2023-02-27 00:17:14 +08:00
parent 9a51cf1b56
commit a755cc13bd
3 changed files with 54 additions and 2 deletions

View File

@@ -140,6 +140,15 @@ namespace Cryville.Crtr {
}
if (rc.PropSrcs != null) ChartPlayer.etor.ContextCascadeDiscard();
}
public void MatchAnimation(AnimationSpan span, float rtime, RuntimeSkinContext ctx) {
foreach (var p in span.properties) {
p.Key.ExecuteDynamic(_group, ctx, p.Value, 0);
}
foreach (var s in span.spans) {
if (rtime < s.Key.Behind || rtime >= s.Key.Ahead) continue;
MatchAnimation(s.Value, rtime, ctx);
}
}
}
public class SkinContext {
public Transform Transform { get; private set; }