static public int SyncLayer(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 UnityEngine.Animation self = (UnityEngine.Animation)checkSelf(l); System.Int32 a1; checkType(l, 2, out a1); self.SyncLayer(a1); pushValue(l, true); return(1); } 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 }
static public int SyncLayer(IntPtr l) { try { UnityEngine.Animation self = (UnityEngine.Animation)checkSelf(l); System.Int32 a1; checkType(l, 2, out a1); self.SyncLayer(a1); return(0); } catch (Exception e) { return(error(l, e)); } }
static int QPYX_SyncLayer_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 2); UnityEngine.Animation QPYX_obj_YXQP = (UnityEngine.Animation)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.Animation)); int QPYX_arg0_YXQP = (int)LuaDLL.luaL_checknumber(L_YXQP, 2); QPYX_obj_YXQP.SyncLayer(QPYX_arg0_YXQP); return(0); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static int SyncLayer(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.Animation obj = (UnityEngine.Animation)ToLua.CheckObject(L, 1, typeof(UnityEngine.Animation)); int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.SyncLayer(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static int SyncLayer_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); UnityEngine.Animation obj = get_obj(nThisPtr); int arg0 = FCLibHelper.fc_get_int(L, 0); obj.SyncLayer(arg0); } catch (Exception e) { Debug.LogException(e); } return(0); }
static int SyncLayer(IntPtr L) { #if UNITY_EDITOR ToluaProfiler.AddCallRecord("UnityEngine.Animation.SyncLayer"); #endif try { ToLua.CheckArgsCount(L, 2); UnityEngine.Animation obj = (UnityEngine.Animation)ToLua.CheckObject(L, 1, typeof(UnityEngine.Animation)); int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.SyncLayer(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static void SetAnis( Animation _animation, AnimationClip[] anisIn, int layerIn, WrapMode wrapModeIn, bool bSyncLayer = false ) { for( int i = 0; i < anisIn.Length; i++ ) { if( anisIn[ i ] != null ) { try { if( _animation.GetClip( anisIn[ i ].name ) != null ) { _animation[ anisIn[ i ].name ].wrapMode = wrapModeIn; _animation[ anisIn[ i ].name ].layer = layerIn; } } catch( System.Exception ex ) { Debug.LogWarning( ex.Message + anisIn[ i ].name + " From: " + _animation.gameObject.name ); } } } if( bSyncLayer ) { _animation.SyncLayer( layerIn ); } }
public static void SetAnis(Animation _animation, string[] aniNames, int layerIn, WrapMode wrapModeIn, bool bSyncLayer = false) { for (int i = 0; i < aniNames.Length; i++) { if (aniNames[i] != null && !string.IsNullOrEmpty( aniNames[i])) { try { if (_animation.GetClip(aniNames[i]) != null) { _animation[aniNames[i]].wrapMode = wrapModeIn; _animation[aniNames[i]].layer = layerIn; } } catch (System.Exception ex) { Debug.LogWarning(ex.Message + aniNames[i] + " From: " + _animation.gameObject.name); } } } if (bSyncLayer) { _animation.SyncLayer(layerIn); } }
private void AnimationSetup() { anim = GetComponent<Animation>(); // 把walk和run动画放到同一层,然后同步他们的速度。 anim["Walk"].layer = 1; anim["Run"].layer = 1; anim.SyncLayer(1); //设置“跳跃”,“爬楼梯”,“下楼梯”的动画模式和速度 anim["RunJump"].wrapMode = WrapMode.ClampForever; anim["RunJump"].speed = 2; anim["Ladder Up"].wrapMode = WrapMode.ClampForever; anim["Ladder Up"].speed = 2; anim["Ladder Down"].wrapMode = WrapMode.ClampForever; anim["Ladder Down"].speed = 2; //初始化动画状态为Idle anim.CrossFade("Idle", 0.1f, PlayMode.StopAll); }
private void AnimationSetup() { anim_ = GetComponent("Animation") as Animation; // loop in sync anim_["Walk"].layer = 1; anim_["Run"].layer = 1; anim_.SyncLayer(1); // speed up & play once anim_["RunJump"].wrapMode = WrapMode.ClampForever; anim_["RunJump"].speed = 2; anim_["Ladder_Up"].wrapMode = WrapMode.ClampForever; anim_["Ladder_Up"].speed = 2; anim_["Ladder_Down"].wrapMode = WrapMode.ClampForever; anim_["Ladder_Down"].speed = 2; if ( isADAPTMan_ ) { anim_["Turn180"].wrapMode = WrapMode.ClampForever; anim_["Turn180"].speed = ladderSpeed_; anim_["Turn180-down"].wrapMode = WrapMode.ClampForever; anim_["Turn180-down"].speed = ladderSpeed_; anim_["Walk_Up"].wrapMode = WrapMode.ClampForever; anim_["Walk_Up"].speed = ladderSpeed_; } anim_.CrossFade("Idle", blendTime, PlayMode.StopAll); }