Пример #1
0
 public void RegisterOutSideAnim(AnimPlayer animPlayer)
 {
     if (animPlayer != null)
     {
         this.animPlayer = animPlayer;
         gameObject.SetActive(startActive);
     }
 }
Пример #2
0
 protected override void Start()
 {
     base.Start();
     animPlayer = GetComponentInChildren <AnimPlayer>(true);
     if (animPlayer != null)
     {
         gameObject.SetActive(startActive);
     }
     else
     {
         gameObject.SetActive(true);
     }
 }
Пример #3
0
 public override void OnUnDoExecute()
 {
     base.OnUnDoExecute();
     if (delyPlay != null)
     {
         StopCoroutine(delyPlay);
     }
     if (animPlayer != null)
     {
         animPlayer.StepUnDo();
         animPlayer.BindingTarget = null;
         animPlayer = null;
     }
 }
Пример #4
0
        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;
                }
            }
        }