public void RegisterOutSideAnim(AnimPlayer animPlayer)
 {
     if (animPlayer != null)
     {
         this.animPlayer = animPlayer;
         gameObject.SetActive(startActive);
     }
 }
 protected override void Start()
 {
     base.Start();
     animPlayer = GetComponentInChildren <AnimPlayer>(true);
     if (animPlayer != null)
     {
         gameObject.SetActive(startActive);
     }
     else
     {
         gameObject.SetActive(true);
     }
 }
 public override void OnUnDoExecute()
 {
     base.OnUnDoExecute();
     if (delyPlay != null)
     {
         StopCoroutine(delyPlay);
     }
     if (animPlayer != null)
     {
         animPlayer.StepUnDo();
         animPlayer.BindingTarget = null;
         animPlayer = null;
     }
 }
        private void FindAnimCore()
        {
            animPlayer = GetComponentInChildren <AnimPlayer>(true);
            if (animPlayer == null)
            {
                var elements = elementCtrl.GetElements <AnimPlayer>(Name);
                if (elements != null && elements.Count > 0)
                {
                    animPlayer = elements.Find(x => x.Body != null && x.BindingTarget == null);//[0];
                }
            }

            if (animPlayer)
            {
                animPlayer.gameObject.SetActive(true);

                if (playAtPostion)
                {
                    animPlayer.transform.localPosition = transform.position;
                    animPlayer.transform.localRotation = transform.rotation;
                }
            }
        }