static public int Shake(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 EZCameraShake.CameraShaker self = (EZCameraShake.CameraShaker)checkSelf(l); EZCameraShake.CameraShakeInstance a1; checkType(l, 2, out a1); var ret = self.Shake(a1); pushValue(l, true); pushValue(l, ret); 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 }
void Awake() { instanceList = new Dictionary<string, CameraShaker>(); Instance = this; instanceList.Add(gameObject.name, this); //Initialize(this); }
static public int set_RestRotationOffset(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 EZCameraShake.CameraShaker self = (EZCameraShake.CameraShaker)checkSelf(l); UnityEngine.Vector3 v; checkType(l, 2, out v); self.RestRotationOffset = v; 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 }
public void Start() { anim = this.GetComponent <Animator>(); FloatingTextController.Initalize(); shaker = EZCameraShake.CameraShaker.GetInstance("CameraTarget"); anim.SetBool("isClicked", false); particles.Stop(); }
void Awake() { Instance = this; var shakeManager = CamShakeManager.Instance; shakeManager.globalCamShake = StartShake(1f, 1f, 0f); shakeManager.ShakeMagnitude = ShakeMagnitude; shakeManager.ShakeRoughness = ShakeRoughness; shakeManager.ShakeMagnitudeDecline = ShakeMagnitudeDecline; //StartShake(ShakeMagnitude, ShakeMagnitude, ShakeMagnitudeDecline); if (!instanceList.ContainsKey(gameObject.name) && !instanceList.ContainsValue(this)) { instanceList.Add(gameObject.name, this); } }
void Awake() { Instance = this; instanceList.Add(gameObject.name, this); }
void Start() { Instance = this; instanceList.Add(gameObject.name, this); }
void Awake() { shaker = FindObjectOfType <EZCameraShake.CameraShaker>(); }
public CameraShaker() { Instance = this; }
static public int ShakeOnce(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 == 5) { EZCameraShake.CameraShaker self = (EZCameraShake.CameraShaker)checkSelf(l); System.Single a1; checkType(l, 2, out a1); System.Single a2; checkType(l, 3, out a2); System.Single a3; checkType(l, 4, out a3); System.Single a4; checkType(l, 5, out a4); var ret = self.ShakeOnce(a1, a2, a3, a4); pushValue(l, true); pushValue(l, ret); return(2); } else if (argc == 7) { EZCameraShake.CameraShaker self = (EZCameraShake.CameraShaker)checkSelf(l); System.Single a1; checkType(l, 2, out a1); System.Single a2; checkType(l, 3, out a2); System.Single a3; checkType(l, 4, out a3); System.Single a4; checkType(l, 5, out a4); UnityEngine.Vector3 a5; checkType(l, 6, out a5); UnityEngine.Vector3 a6; checkType(l, 7, out a6); var ret = self.ShakeOnce(a1, a2, a3, a4, a5, a6); pushValue(l, true); pushValue(l, ret); return(2); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function ShakeOnce 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 }