// Use this for initialization void Awake() { isWalking = false; jump = false; jumping = false; previouslyGrounded = true; stepCycle = 0.0f; nextStep = stepCycle / 2.0f; rotationX = camera.transform.localRotation.eulerAngles.x; rotationY = this.transform.localRotation.eulerAngles.y; userInput = Vector2.zero; moveDirection = Vector3.zero; originalCameraPosition = camera.transform.localPosition; characterController = GetComponent <CharacterController>(); audioSource = GetComponent <AudioSource>(); fovKick = new FOVKick(); fovKick.IncreaseCurve = FOVIncreaseCurve; fovKick.Setup(camera, 3.0f, 1.0f, 1.0f); headBob = new CurveControlledBob(); headBob.Setup(camera, stepInterval, 0.1f, 0.1f, 2.0f); jumpBob = new LerpControlledBob { BobDuration = 0.2f, BobAmount = 0.1f }; PlayerNumber = 0; }
static int ChangeCamera(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); FOVKick obj = (FOVKick)ToLua.CheckObject <FOVKick>(L, 1); UnityEngine.Camera arg0 = (UnityEngine.Camera)ToLua.CheckObject(L, 2, typeof(UnityEngine.Camera)); obj.ChangeCamera(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int FOVKickUp(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); FOVKick obj = (FOVKick)ToLua.CheckObject <FOVKick>(L, 1); System.Collections.IEnumerator o = obj.FOVKickUp(); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int set_TimeToDecrease(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FOVKick obj = (FOVKick)o; float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.TimeToDecrease = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index TimeToDecrease on a nil value")); } }
static int set_IncreaseCurve(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FOVKick obj = (FOVKick)o; UnityEngine.AnimationCurve arg0 = (UnityEngine.AnimationCurve)ToLua.CheckObject(L, 2, typeof(UnityEngine.AnimationCurve)); obj.IncreaseCurve = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index IncreaseCurve on a nil value")); } }
static int set_Camera(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FOVKick obj = (FOVKick)o; UnityEngine.Camera arg0 = (UnityEngine.Camera)ToLua.CheckObject(L, 2, typeof(UnityEngine.Camera)); obj.Camera = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index Camera on a nil value")); } }
static int get_IncreaseCurve(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FOVKick obj = (FOVKick)o; UnityEngine.AnimationCurve ret = obj.IncreaseCurve; ToLua.PushSealed(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index IncreaseCurve on a nil value")); } }
static int get_TimeToDecrease(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FOVKick obj = (FOVKick)o; float ret = obj.TimeToDecrease; LuaDLL.lua_pushnumber(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index TimeToDecrease on a nil value")); } }
static int get_Camera(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FOVKick obj = (FOVKick)o; UnityEngine.Camera ret = obj.Camera; ToLua.PushSealed(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index Camera on a nil value")); } }
static int _CreateFOVKick(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { FOVKick obj = new FOVKick(); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: FOVKick.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }