Exemplo n.º 1
0
 public override void OnExit()
 {
     if (this.mecanim != null)
     {
         UnityEngine.Object.Destroy(this.mecanim);
         this.mecanim = null;
     }
 }
Exemplo n.º 2
0
 public Skill_Jinkesi_01(string skill_id, Units self) : base(skill_id, self)
 {
     if (this.mecanim == null)
     {
         this.mecanim = this.unit.animController.GetMecanim();
     }
     this.task = GlobalObject.Instance.StartCoroutine(this.UpdateAnim());
 }
Exemplo n.º 3
0
 public override void OnCreate()
 {
     base.OnCreate();
     this.mecanim = this.self.mMecanim;
     if (this.mecanim != null && this.mecanim.animator != null)
     {
         this.mecanim.animator.applyRootMotion = false;
     }
 }
Exemplo n.º 4
0
    public static Mecanim AddAnimationBase(Transform character)
    {
        Mecanim  mecanim             = null;
        Animator componentInChildren = character.GetComponentInChildren <Animator>();

        if (componentInChildren != null)
        {
            mecanim = character.gameObject.GetComponent <Mecanim>();
            if (mecanim == null)
            {
                mecanim = character.gameObject.AddComponent <Mecanim>();
            }
        }
        return(mecanim);
    }