Add "cur" anchor.

This commit is contained in:
2022-12-22 14:43:50 +08:00
parent 8175ca7e82
commit ec9b23f797
3 changed files with 82 additions and 53 deletions

View File

@@ -38,6 +38,7 @@ namespace Cryville.Crtr.Event {
public Transform gogroup;
public readonly Dictionary<int, Anchor> Anchors = new Dictionary<int, Anchor>();
protected Transform a_cur;
protected Transform a_head;
protected Transform a_tail;
public Vector3 Position {
@@ -76,12 +77,14 @@ namespace Cryville.Crtr.Event {
public abstract string TypeName {
get;
}
protected readonly static int _a_cur = IdentifierManager.SharedInstance.Request("cur");
protected readonly static int _a_head = IdentifierManager.SharedInstance.Request("head");
protected readonly static int _a_tail = IdentifierManager.SharedInstance.Request("tail");
public virtual void PreInit() {
gogroup = new GameObject(TypeName + ":" + Container.GetHashCode().ToString(CultureInfo.InvariantCulture)).transform;
if (cs.Parent != null)
gogroup.SetParent(cs.Parent.Handler.gogroup, false);
a_cur = RegisterAnchor(_a_cur);
a_head = RegisterAnchor(_a_head);
a_tail = RegisterAnchor(_a_tail);
}