Postpone skin static matching.

This commit is contained in:
2022-11-20 16:09:34 +08:00
parent ce30b5427b
commit d08eea5c1e
4 changed files with 29 additions and 17 deletions

View File

@@ -86,10 +86,10 @@ namespace Cryville.Crtr.Event {
Anchors.Add("tail", new Anchor() { Transform = a_tail });
}
/// <summary>
/// Called upon initialization of <see cref="cs" />.
/// Called upon StartUpdate of ps 17.
/// </summary>
public virtual void Init() {
skinContainer.MatchStatic(cs);
skinContainer.MatchStatic(ps);
foreach (var i in gogroup.GetComponentsInChildren<SkinComponent>())
i.Init();
}
@@ -118,6 +118,9 @@ namespace Cryville.Crtr.Event {
PreAwake(s);
Awake(s);
}
else if (s.CloneType == 17) {
Init();
}
}
public virtual void Update(ContainerState s, StampedEvent ev) {
bool flag = !Awoken && s.CloneType >= 2 && s.CloneType < 16;