private void InitSkeleton() { if (skeletonRoot) { skeletonTransformMomentos = new List <TransformMemento>(); skeletonTransforms = skeletonRoot.GetComponentsInChildren <Transform>(); foreach (Transform transform in skeletonTransforms) { TransformMemento transformMemento = new TransformMemento(); transformMemento.Initialize(transform); skeletonTransformMomentos.Add(transformMemento); } } }
protected override void Awake() { base.Awake(); poolParent = transform.parent; skeletonRootMemento.Initialize(skeletonRoot.transform); transformMemento.Initialize(transform); InitSkeleton(); ExtractRbWeights(); if (grabObject != null) { grabObjectMomento = new TransformMemento(); grabObjectMomento.Initialize(grabObject.transform); } ResetForRebirth(); }
public void Initialize() { savedConfiguration.Initialize(transform); }
private void Awake() { spriteRenderer = GetComponentInChildren <SpriteRenderer>(); initialTransform.Initialize(transform); }