static int _m_Sample(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.Animation __cl_gen_to_be_invoked = (UnityEngine.Animation)translator.FastGetCSObj(L, 1); try { { __cl_gen_to_be_invoked.Sample( ); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_GetEnumerator(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.Animation __cl_gen_to_be_invoked = (UnityEngine.Animation)translator.FastGetCSObj(L, 1); try { { System.Collections.IEnumerator __cl_gen_ret = __cl_gen_to_be_invoked.GetEnumerator( ); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_GetClipCount(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.Animation __cl_gen_to_be_invoked = (UnityEngine.Animation)translator.FastGetCSObj(L, 1); try { { int __cl_gen_ret = __cl_gen_to_be_invoked.GetClipCount( ); LuaAPI.xlua_pushinteger(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_get_Item(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.Animation gen_to_be_invoked = (UnityEngine.Animation)translator.FastGetCSObj(L, 1); { string key = LuaAPI.lua_tostring(L, 2); translator.Push(L, gen_to_be_invoked[key]); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
/// <summary> /// Apply changes to UnityEngine.Animation component /// </summary> /// <param name="animationComponent">UnityEngine.Animation to apply changes to</param> internal void Apply(UnityEngine.Animation animationComponent) { foreach (var anim in ActiveAnimNodes) // iterate throw all active AnimNodeSequences { UnityEngine.AnimationState state = animationComponent[anim.CurrentAnimation]; // access state if (state != null) { state.speed = anim.Speed; // set parameters state.blendMode = BlendMode; state.wrapMode = anim.WrapMode; state.layer = LayerIndex; state.weight = anim.BlendWeight.Weight; // disable or enable animation if (anim.BlendWeight.Weight == 0) { state.enabled = false; } else { state.enabled = true; } } // if profile changed in previous frame if (anim.UpdatePreviousAnimation) { if (anim.PreviousAnimation != null) { UnityEngine.AnimationState preState = animationComponent[anim.PreviousAnimation]; if (preState != null) { animationComponent.Blend(anim.PreviousAnimation, 0, 0.3f); } } anim.UpdatePreviousAnimation = false; } } }
static int _m_GetEnumerator(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.Animation gen_to_be_invoked = (UnityEngine.Animation)translator.FastGetCSObj(L, 1); { var gen_ret = gen_to_be_invoked.GetEnumerator( ); translator.PushAny(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_SyncLayer(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.Animation gen_to_be_invoked = (UnityEngine.Animation)translator.FastGetCSObj(L, 1); { int _layer = LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.SyncLayer(_layer); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_GetClip(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.Animation __cl_gen_to_be_invoked = (UnityEngine.Animation)translator.FastGetCSObj(L, 1); try { { string name = LuaAPI.lua_tostring(L, 2); UnityEngine.AnimationClip __cl_gen_ret = __cl_gen_to_be_invoked.GetClip(name); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_RemoveClip(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.Animation gen_to_be_invoked = (UnityEngine.Animation)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 2 && translator.Assignable <UnityEngine.AnimationClip>(L, 2)) { UnityEngine.AnimationClip _clip = (UnityEngine.AnimationClip)translator.GetObject(L, 2, typeof(UnityEngine.AnimationClip)); gen_to_be_invoked.RemoveClip(_clip); return(0); } if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string _clipName = LuaAPI.lua_tostring(L, 2); gen_to_be_invoked.RemoveClip(_clipName); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Animation.RemoveClip!")); }
static int _m_IsPlaying(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.Animation gen_to_be_invoked = (UnityEngine.Animation)translator.FastGetCSObj(L, 1); { string _name = LuaAPI.lua_tostring(L, 2); bool gen_ret = gen_to_be_invoked.IsPlaying(_name); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_FindAnimation_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 2 && translator.Assignable <UnityEngine.GameObject>(L, 1) && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject)); string _path = LuaAPI.lua_tostring(L, 2); UnityEngine.Animation gen_ret = Game.CommonUtil.FindAnimation(_go, _path); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 1 && translator.Assignable <UnityEngine.GameObject>(L, 1)) { UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject)); UnityEngine.Animation gen_ret = Game.CommonUtil.FindAnimation(_go); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 2 && translator.Assignable <UnityEngine.Transform>(L, 1) && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { UnityEngine.Transform _trans = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform)); string _path = LuaAPI.lua_tostring(L, 2); UnityEngine.Animation gen_ret = Game.CommonUtil.FindAnimation(_trans, _path); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 1 && translator.Assignable <UnityEngine.Transform>(L, 1)) { UnityEngine.Transform _trans = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform)); UnityEngine.Animation gen_ret = Game.CommonUtil.FindAnimation(_trans); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to Game.CommonUtil.FindAnimation!")); }
static int _m_CrossFadeQueued(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.Animation gen_to_be_invoked = (UnityEngine.Animation)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string _animation = LuaAPI.lua_tostring(L, 2); UnityEngine.AnimationState gen_ret = gen_to_be_invoked.CrossFadeQueued(_animation); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { string _animation = LuaAPI.lua_tostring(L, 2); float _fadeLength = (float)LuaAPI.lua_tonumber(L, 3); UnityEngine.AnimationState gen_ret = gen_to_be_invoked.CrossFadeQueued(_animation, _fadeLength); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <UnityEngine.QueueMode>(L, 4)) { string _animation = LuaAPI.lua_tostring(L, 2); float _fadeLength = (float)LuaAPI.lua_tonumber(L, 3); UnityEngine.QueueMode _queue; translator.Get(L, 4, out _queue); UnityEngine.AnimationState gen_ret = gen_to_be_invoked.CrossFadeQueued(_animation, _fadeLength, _queue); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 5 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <UnityEngine.QueueMode>(L, 4) && translator.Assignable <UnityEngine.PlayMode>(L, 5)) { string _animation = LuaAPI.lua_tostring(L, 2); float _fadeLength = (float)LuaAPI.lua_tonumber(L, 3); UnityEngine.QueueMode _queue; translator.Get(L, 4, out _queue); UnityEngine.PlayMode _mode; translator.Get(L, 5, out _mode); UnityEngine.AnimationState gen_ret = gen_to_be_invoked.CrossFadeQueued(_animation, _fadeLength, _queue, _mode); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Animation.CrossFadeQueued!")); }