static void AnimationState_blendMode(JSVCall vc)
 {
     if (vc.bGet)
     {
         UnityEngine.AnimationState _this = (UnityEngine.AnimationState)vc.csObj;
         var result = _this.blendMode;
         JSApi.setEnum((int)JSApi.SetType.Rval, (int)result);
     }
     else
     {
         UnityEngine.AnimationBlendMode arg0  = (UnityEngine.AnimationBlendMode)JSApi.getEnum((int)JSApi.GetType.Arg);
         UnityEngine.AnimationState     _this = (UnityEngine.AnimationState)vc.csObj;
         _this.blendMode = arg0;
     }
 }
Пример #2
0
        protected void PlayAnimation(GameObject obj, Animation_Type anim, float speed = 1.0f, UnityEngine.AnimationBlendMode blendMode = UnityEngine.AnimationBlendMode.Blend)
        {
            Animation animation = obj.GetComponent <Animation>();

            if (null != obj && null != animation)
            {
                string animName = GetAnimationNameByType(obj, anim);
                if (!string.IsNullOrEmpty(animName) && null != animation[animName])
                {
                    if (!animation.IsPlaying(animName))
                    {
                        animation[animName].speed = speed;
                        animation.Play(animName);
                        animation[animName].blendMode = blendMode;
                    }
                }
            }
            else
            {
                if (null == obj)
                {
                    LogSystem.Error("null obj");
                }
                else
                {
                    LogSystem.Error("null anim");
                }
            }
        }
Пример #3
0
 private static ArkCrossEngine.AnimationBlendMode Convert(CrossEngineImpl.AnimationBlendMode mode)
 {
     return((ArkCrossEngine.AnimationBlendMode)(int)(CrossEngineImpl.AnimationBlendMode)(mode));
 }