Exemplo n.º 1
0
    static void AnimatorClipInfo_weight(JSVCall vc)
    {
        UnityEngine.AnimatorClipInfo _this = (UnityEngine.AnimatorClipInfo)vc.csObj;
        var result = _this.weight;

        JSApi.setSingle((int)JSApi.SetType.Rval, (System.Single)(result));
    }
Exemplo n.º 2
0
 static public int constructor(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.AnimatorClipInfo o;
         o = new UnityEngine.AnimatorClipInfo();
         pushValue(l, true);
         pushValue(l, o);
         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
 }
Exemplo n.º 3
0
// fields

// properties
    static void AnimatorClipInfo_clip(JSVCall vc)
    {
        UnityEngine.AnimatorClipInfo _this = (UnityEngine.AnimatorClipInfo)vc.csObj;
        var result = _this.clip;

        JSMgr.datax.setObject((int)JSApi.SetType.Rval, result);
    }
	static public int constructor(IntPtr l) {
		try {
			UnityEngine.AnimatorClipInfo o;
			o=new UnityEngine.AnimatorClipInfo();
			pushValue(l,true);
			pushValue(l,o);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
Exemplo n.º 5
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.AnimatorClipInfo o;
         o = new UnityEngine.AnimatorClipInfo();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 public static int constructor(IntPtr l)
 {
     try {
         UnityEngine.AnimatorClipInfo o;
         o=new UnityEngine.AnimatorClipInfo();
         pushValue(l,o);
         return 1;
     }
     catch(Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return 0;
     }
 }
Exemplo n.º 7
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.AnimatorClipInfo o;
         o = new UnityEngine.AnimatorClipInfo();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 public int Run(bool animDone, bool playerSpotted, bool playerDead, bool hpLow, bool infrontOfPlayer, float distance, bool hit, AnimatorClipInfo[] state)
 {
     //Debug.Log(currState);
     switch (currState)
     {
         case State.Wait: currState = Wait(hit, distance); break;
         case State.Patrol: currState = Patrol(playerSpotted, distance, hit); break;
         case State.Flee: currState = Flee(playerDead, distance, hit); break;
         case State.Chase: currState = Chase(playerDead, infrontOfPlayer, distance, hpLow, hit, followDistance); break;
         case State.Tired: currState = Tired(hit, distance); break;
         case State.Attack: currState = Attack(animDone, playerDead, infrontOfPlayer, hpLow, hit); break;
         case State.Hit: currState = Hit(animDone, hpLow, state); break;
     }
     return (int)currState;
 }
    static int get_weight(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AnimatorClipInfo obj = (UnityEngine.AnimatorClipInfo)o;
            float ret = obj.weight;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index weight on a nil value"));
        }
    }
    static int get_clip(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AnimatorClipInfo obj = (UnityEngine.AnimatorClipInfo)o;
            UnityEngine.AnimationClip    ret = obj.clip;
            ToLua.PushSealed(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index clip on a nil value"));
        }
    }
    static int get_animatorClipInfo(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AnimationEvent   obj = (UnityEngine.AnimationEvent)o;
            UnityEngine.AnimatorClipInfo ret = obj.animatorClipInfo;
            ToLua.PushValue(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index animatorClipInfo on a nil value" : e.Message));
        }
    }
 private State Hit(bool animDone, bool hpLow, AnimatorClipInfo[] state)
 {
     if (animDone && state.Length > 0 && state[0].clip.name.Equals("Hurt"))
     {
         if (coward || (hpLow && !fearless))
             return State.Flee;
         return State.Wait;
     }
     return State.Hit;
 }
 static int _CreateUnityEngine_AnimatorClipInfo(IntPtr L)
 {
     UnityEngine.AnimatorClipInfo obj = new UnityEngine.AnimatorClipInfo();
     ToLua.PushValue(L, obj);
     return(1);
 }
 static int _CreateAnimatorClipInfo(IntPtr L)
 {
     LuaScriptMgr.CheckArgsCount(L, 0);
     AnimatorClipInfo obj = new AnimatorClipInfo();
     LuaScriptMgr.PushValue(L, obj);
     return 1;
 }