CrossFadeQueued() public method

public CrossFadeQueued ( string animation ) : AnimationState
animation string
return AnimationState
コード例 #1
0
 static public int CrossFadeQueued(IntPtr l)
 {
     try{
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 5)
         {
             UnityEngine.Animation self = (UnityEngine.Animation)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             UnityEngine.QueueMode a3;
             checkEnum(l, 4, out a3);
             UnityEngine.PlayMode a4;
             checkEnum(l, 5, out a4);
             UnityEngine.AnimationState ret = self.CrossFadeQueued(a1, a2, a3, a4);
             pushValue(l, ret);
             return(1);
         }
         else if (argc == 4)
         {
             UnityEngine.Animation self = (UnityEngine.Animation)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             UnityEngine.QueueMode a3;
             checkEnum(l, 4, out a3);
             UnityEngine.AnimationState ret = self.CrossFadeQueued(a1, a2, a3);
             pushValue(l, ret);
             return(1);
         }
         else if (argc == 3)
         {
             UnityEngine.Animation self = (UnityEngine.Animation)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             UnityEngine.AnimationState ret = self.CrossFadeQueued(a1, a2);
             pushValue(l, ret);
             return(1);
         }
         else if (argc == 2)
         {
             UnityEngine.Animation self = (UnityEngine.Animation)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             UnityEngine.AnimationState ret = self.CrossFadeQueued(a1);
             pushValue(l, ret);
             return(1);
         }
         LuaDLL.luaL_error(l, "No matched override function to call");
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
コード例 #2
0
    static int CrossFadeQueued(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("UnityEngine.Animation.Register");
#endif
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                UnityEngine.Animation obj = (UnityEngine.Animation)ToLua.CheckObject(L, 1, typeof(UnityEngine.Animation));
                string arg0 = ToLua.CheckString(L, 2);
                UnityEngine.AnimationState o = obj.CrossFadeQueued(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 3)
            {
                UnityEngine.Animation obj = (UnityEngine.Animation)ToLua.CheckObject(L, 1, typeof(UnityEngine.Animation));
                string arg0 = ToLua.CheckString(L, 2);
                float  arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                UnityEngine.AnimationState o = obj.CrossFadeQueued(arg0, arg1);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 4)
            {
                UnityEngine.Animation obj = (UnityEngine.Animation)ToLua.CheckObject(L, 1, typeof(UnityEngine.Animation));
                string arg0 = ToLua.CheckString(L, 2);
                float  arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                UnityEngine.QueueMode      arg2 = (UnityEngine.QueueMode)ToLua.CheckObject(L, 4, typeof(UnityEngine.QueueMode));
                UnityEngine.AnimationState o    = obj.CrossFadeQueued(arg0, arg1, arg2);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 5)
            {
                UnityEngine.Animation obj = (UnityEngine.Animation)ToLua.CheckObject(L, 1, typeof(UnityEngine.Animation));
                string arg0 = ToLua.CheckString(L, 2);
                float  arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                UnityEngine.QueueMode      arg2 = (UnityEngine.QueueMode)ToLua.CheckObject(L, 4, typeof(UnityEngine.QueueMode));
                UnityEngine.PlayMode       arg3 = (UnityEngine.PlayMode)ToLua.CheckObject(L, 5, typeof(UnityEngine.PlayMode));
                UnityEngine.AnimationState o    = obj.CrossFadeQueued(arg0, arg1, arg2, arg3);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Animation.CrossFadeQueued"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #3
0
    static int CrossFadeQueued(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                UnityEngine.Animation obj = (UnityEngine.Animation)ToLua.CheckObject <UnityEngine.Animation>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                UnityEngine.AnimationState o = obj.CrossFadeQueued(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 3)
            {
                UnityEngine.Animation obj = (UnityEngine.Animation)ToLua.CheckObject <UnityEngine.Animation>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                float  arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                UnityEngine.AnimationState o = obj.CrossFadeQueued(arg0, arg1);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 4)
            {
                UnityEngine.Animation obj = (UnityEngine.Animation)ToLua.CheckObject <UnityEngine.Animation>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                float  arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                UnityEngine.QueueMode      arg2 = (UnityEngine.QueueMode)ToLua.CheckObject(L, 4, TypeTraits <UnityEngine.QueueMode> .type);
                UnityEngine.AnimationState o    = obj.CrossFadeQueued(arg0, arg1, arg2);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 5)
            {
                UnityEngine.Animation obj = (UnityEngine.Animation)ToLua.CheckObject <UnityEngine.Animation>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                float  arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                UnityEngine.QueueMode      arg2 = (UnityEngine.QueueMode)ToLua.CheckObject(L, 4, TypeTraits <UnityEngine.QueueMode> .type);
                UnityEngine.PlayMode       arg3 = (UnityEngine.PlayMode)ToLua.CheckObject(L, 5, TypeTraits <UnityEngine.PlayMode> .type);
                UnityEngine.AnimationState o    = obj.CrossFadeQueued(arg0, arg1, arg2, arg3);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Animation.CrossFadeQueued"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #4
0
    static int CrossFadeQueued(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Animation), typeof(string)))
            {
                UnityEngine.Animation obj = (UnityEngine.Animation)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                UnityEngine.AnimationState o = obj.CrossFadeQueued(arg0);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Animation), typeof(string), typeof(float)))
            {
                UnityEngine.Animation obj = (UnityEngine.Animation)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                float  arg1 = (float)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.AnimationState o = obj.CrossFadeQueued(arg0, arg1);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Animation), typeof(string), typeof(float), typeof(UnityEngine.QueueMode)))
            {
                UnityEngine.Animation obj = (UnityEngine.Animation)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                float  arg1 = (float)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.QueueMode      arg2 = (UnityEngine.QueueMode)ToLua.ToObject(L, 4);
                UnityEngine.AnimationState o    = obj.CrossFadeQueued(arg0, arg1, arg2);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 5 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Animation), typeof(string), typeof(float), typeof(UnityEngine.QueueMode), typeof(UnityEngine.PlayMode)))
            {
                UnityEngine.Animation obj = (UnityEngine.Animation)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                float  arg1 = (float)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.QueueMode      arg2 = (UnityEngine.QueueMode)ToLua.ToObject(L, 4);
                UnityEngine.PlayMode       arg3 = (UnityEngine.PlayMode)ToLua.ToObject(L, 5);
                UnityEngine.AnimationState o    = obj.CrossFadeQueued(arg0, arg1, arg2, arg3);
                ToLua.Push(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Animation.CrossFadeQueued"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #5
0
        public AnimationState CrossFadeAnimQueued(AnimGroup group, AnimIndex anim, float duration, QueueMode queueMode, PlayMode playMode)
        {
            var animState = LoadAnim(group, anim);

            _curAnimGroup = AnimGroup = group;
            _curAnim      = AnimIndex = anim;

            _anim.CrossFadeQueued(animState.name, duration, queueMode, playMode);

            return(animState);
        }
コード例 #6
0
 static int QPYX_CrossFadeQueued_YXQP(IntPtr L_YXQP)
 {
     try
     {
         int QPYX_count_YXQP = LuaDLL.lua_gettop(L_YXQP);
         if (QPYX_count_YXQP == 2)
         {
             UnityEngine.Animation QPYX_obj_YXQP = (UnityEngine.Animation)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.Animation));
             string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2);
             UnityEngine.AnimationState QPYX_o_YXQP = QPYX_obj_YXQP.CrossFadeQueued(QPYX_arg0_YXQP);
             ToLua.PushSealed(L_YXQP, QPYX_o_YXQP);
             return(1);
         }
         else if (QPYX_count_YXQP == 3)
         {
             UnityEngine.Animation QPYX_obj_YXQP = (UnityEngine.Animation)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.Animation));
             string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2);
             float  QPYX_arg1_YXQP = (float)LuaDLL.luaL_checknumber(L_YXQP, 3);
             UnityEngine.AnimationState QPYX_o_YXQP = QPYX_obj_YXQP.CrossFadeQueued(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
             ToLua.PushSealed(L_YXQP, QPYX_o_YXQP);
             return(1);
         }
         else if (QPYX_count_YXQP == 4)
         {
             UnityEngine.Animation QPYX_obj_YXQP = (UnityEngine.Animation)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.Animation));
             string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2);
             float  QPYX_arg1_YXQP = (float)LuaDLL.luaL_checknumber(L_YXQP, 3);
             UnityEngine.QueueMode      QPYX_arg2_YXQP = (UnityEngine.QueueMode)ToLua.CheckObject(L_YXQP, 4, typeof(UnityEngine.QueueMode));
             UnityEngine.AnimationState QPYX_o_YXQP    = QPYX_obj_YXQP.CrossFadeQueued(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP);
             ToLua.PushSealed(L_YXQP, QPYX_o_YXQP);
             return(1);
         }
         else if (QPYX_count_YXQP == 5)
         {
             UnityEngine.Animation QPYX_obj_YXQP = (UnityEngine.Animation)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.Animation));
             string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2);
             float  QPYX_arg1_YXQP = (float)LuaDLL.luaL_checknumber(L_YXQP, 3);
             UnityEngine.QueueMode      QPYX_arg2_YXQP = (UnityEngine.QueueMode)ToLua.CheckObject(L_YXQP, 4, typeof(UnityEngine.QueueMode));
             UnityEngine.PlayMode       QPYX_arg3_YXQP = (UnityEngine.PlayMode)ToLua.CheckObject(L_YXQP, 5, typeof(UnityEngine.PlayMode));
             UnityEngine.AnimationState QPYX_o_YXQP    = QPYX_obj_YXQP.CrossFadeQueued(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP, QPYX_arg3_YXQP);
             ToLua.PushSealed(L_YXQP, QPYX_o_YXQP);
             return(1);
         }
         else
         {
             return(LuaDLL.luaL_throw(L_YXQP, "invalid arguments to method: UnityEngine.Animation.CrossFadeQueued"));
         }
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
コード例 #7
0
 static public int CrossFadeQueued__String(IntPtr l)
 {
     try {
         UnityEngine.Animation self = (UnityEngine.Animation)checkSelf(l);
         System.String         a1;
         checkType(l, 2, out a1);
         var ret = self.CrossFadeQueued(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #8
0
 public static int CrossFadeQueued3_wrap(long L)
 {
     try
     {
         long nThisPtr             = FCLibHelper.fc_get_inport_obj_ptr(L);
         UnityEngine.Animation obj = get_obj(nThisPtr);
         string arg0 = FCLibHelper.fc_get_string_a(L, 0);
         UnityEngine.AnimationState ret = obj.CrossFadeQueued(arg0);
         long ret_ptr = FCLibHelper.fc_get_return_ptr(L);
         long v       = FCGetObj.PushObj(ret);
         FCLibHelper.fc_set_value_wrap_objptr(ret_ptr, v);
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
     return(0);
 }
コード例 #9
0
 static public int CrossFadeQueued__String__Single__QueueMode(IntPtr l)
 {
     try {
         UnityEngine.Animation self = (UnityEngine.Animation)checkSelf(l);
         System.String         a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         UnityEngine.QueueMode a3;
         checkEnum(l, 4, out a3);
         var ret = self.CrossFadeQueued(a1, a2, a3);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #10
0
 public static int CrossFadeQueued1_wrap(long L)
 {
     try
     {
         long VM                         = FCLibHelper.fc_get_vm_ptr(L);
         long nThisPtr                   = FCLibHelper.fc_get_inport_obj_ptr(L);
         UnityEngine.Animation obj       = get_obj(nThisPtr);
         string arg0                     = FCLibHelper.fc_get_string_a(L, 0);
         float  arg1                     = FCLibHelper.fc_get_float(L, 1);
         UnityEngine.QueueMode      arg2 = (UnityEngine.QueueMode)(FCLibHelper.fc_get_int(L, 2));
         UnityEngine.AnimationState ret  = obj.CrossFadeQueued(arg0, arg1, arg2);
         long ret_ptr                    = FCLibHelper.fc_get_return_ptr(L);
         long v = FCGetObj.PushObj(ret);
         FCLibHelper.fc_set_value_wrap_objptr(VM, ret_ptr, v);
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
     return(0);
 }
コード例 #11
0
 static public int CrossFadeQueued(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 2)
         {
             UnityEngine.Animation self = (UnityEngine.Animation)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             var ret = self.CrossFadeQueued(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 3)
         {
             UnityEngine.Animation self = (UnityEngine.Animation)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             var ret = self.CrossFadeQueued(a1, a2);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 4)
         {
             UnityEngine.Animation self = (UnityEngine.Animation)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             UnityEngine.QueueMode a3;
             a3 = (UnityEngine.QueueMode)LuaDLL.luaL_checkinteger(l, 4);
             var ret = self.CrossFadeQueued(a1, a2, a3);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 5)
         {
             UnityEngine.Animation self = (UnityEngine.Animation)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             UnityEngine.QueueMode a3;
             a3 = (UnityEngine.QueueMode)LuaDLL.luaL_checkinteger(l, 4);
             UnityEngine.PlayMode a4;
             a4 = (UnityEngine.PlayMode)LuaDLL.luaL_checkinteger(l, 5);
             var ret = self.CrossFadeQueued(a1, a2, a3, a4);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function CrossFadeQueued to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
コード例 #12
0
 private bool PlayAnimation(Animation animation, string name)
 {
     bool b = false;
     if(animation != null && name != "" && animation[name] != null)
     {
         if(this.show) animation[name].layer = this.min;
         if(this.playOptions[this.number] == "Play")
         {
             animation.Play(name, this.playMode);
         }
         else if(this.playOptions[this.number] == "CrossFade")
         {
             animation.CrossFade(name, this.time, this.playMode);
         }
         else if(this.playOptions[this.number] == "Blend")
         {
             animation.Blend(name, this.speed, this.time);
         }
         else if(this.playOptions[this.number] == "PlayQueued")
         {
             animation.PlayQueued(name, this.queueMode, this.playMode);
         }
         else if(this.playOptions[this.number] == "CrossFadeQueued")
         {
             animation.CrossFadeQueued(name, this.time, this.queueMode, this.playMode);
         }
         b = true;
     }
     return b;
 }
コード例 #13
0
ファイル: clsurgutils.cs プロジェクト: GameDiffs/TheForest
 public static int metcrossfadetransitionanimation(Transform varpcharacter, string varpdestinationanimname, float varptransitiontime, Transform varpcontroller = null, string varpstateanimationname = "", bool varpgokinematic = true, string varpnewanimname = "transition", Animation varpanimationsystem = null, SkinnedMeshRenderer varprenderer = null, clsurganimationstatesmanager varpstatesmanager = null)
 {
     if (varpcharacter == null)
     {
         return -1;
     }
     if (varptransitiontime == 0f)
     {
         return -2;
     }
     if (varpanimationsystem == null)
     {
         varpanimationsystem = varpcharacter.root.GetComponentInChildren<Animation>();
         if (varpanimationsystem == null)
         {
             return -3;
         }
         varpanimationsystem.Stop();
     }
     if (varprenderer == null)
     {
         varprenderer = varpcharacter.root.GetComponentInChildren<SkinnedMeshRenderer>();
         if (varprenderer == null)
         {
             return -4;
         }
     }
     if (varpgokinematic)
     {
         clsurgutils.metgodriven(varpcharacter, true);
     }
     Vector3 localPosition = default(Vector3);
     if (varpcontroller != null)
     {
         Vector3 position = varpcharacter.position;
         varpcontroller.position = position;
         varpcharacter.localPosition = localPosition;
     }
     AnimationClip animationClip = clsurgutils.metcreatetransitionanimation(varpcharacter, varpdestinationanimname, varptransitiontime, varpnewanimname, ref localPosition, varpstatesmanager, false);
     if (animationClip != null)
     {
         varpanimationsystem.Stop();
         AnimationState animationState = varpanimationsystem[varpdestinationanimname];
         if (animationState != null && animationState.name != varpdestinationanimname)
         {
             varpanimationsystem.RemoveClip(varpnewanimname);
         }
         varpanimationsystem.AddClip(animationClip, varpnewanimname);
         if (varpstateanimationname != string.Empty)
         {
             varpanimationsystem[varpnewanimname].wrapMode = WrapMode.Once;
             varpanimationsystem.CrossFade(varpnewanimname);
             varpanimationsystem.CrossFadeQueued(varpstateanimationname);
         }
         else
         {
             varpanimationsystem.CrossFade(varpnewanimname);
         }
         return 1;
     }
     Debug.LogError("Could not create transition");
     return -5;
 }