static int _m_Pause(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem __cl_gen_to_be_invoked = (UnityEngine.ParticleSystem)translator.FastGetCSObj(L, 1); int __gen_param_count = LuaAPI.lua_gettop(L); try { if (__gen_param_count == 1) { __cl_gen_to_be_invoked.Pause( ); return(0); } if (__gen_param_count == 2 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2)) { bool withChildren = LuaAPI.lua_toboolean(L, 2); __cl_gen_to_be_invoked.Pause(withChildren); 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.ParticleSystem.Pause!")); }
static int Pause(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.CheckObject(L, 1, typeof(UnityEngine.ParticleSystem)); obj.Pause(); return(0); } else if (count == 2) { UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.CheckObject(L, 1, typeof(UnityEngine.ParticleSystem)); bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.Pause(arg0); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.ParticleSystem.Pause")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int QPYX_Pause_YXQP(IntPtr L_YXQP) { try { int QPYX_count_YXQP = LuaDLL.lua_gettop(L_YXQP); if (QPYX_count_YXQP == 1) { UnityEngine.ParticleSystem QPYX_obj_YXQP = (UnityEngine.ParticleSystem)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.ParticleSystem)); QPYX_obj_YXQP.Pause(); return(0); } else if (QPYX_count_YXQP == 2) { UnityEngine.ParticleSystem QPYX_obj_YXQP = (UnityEngine.ParticleSystem)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.ParticleSystem)); bool QPYX_arg0_YXQP = LuaDLL.luaL_checkboolean(L_YXQP, 2); QPYX_obj_YXQP.Pause(QPYX_arg0_YXQP); return(0); } else { return(LuaDLL.luaL_throw(L_YXQP, "invalid arguments to method: UnityEngine.ParticleSystem.Pause")); } } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static public int Pause(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (argc == 1) { UnityEngine.ParticleSystem self = (UnityEngine.ParticleSystem)checkSelf(l); self.Pause(); return(0); } else if (argc == 2) { UnityEngine.ParticleSystem self = (UnityEngine.ParticleSystem)checkSelf(l); System.Boolean a1; checkType(l, 2, out a1); self.Pause(a1); return(0); } LuaDLL.luaL_error(l, "No matched override function to call"); return(0); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
static int Pause(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1 && TypeChecker.CheckTypes <UnityEngine.ParticleSystem>(L, 1)) { UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.ToObject(L, 1); obj.Pause(); return(0); } else if (count == 2 && TypeChecker.CheckTypes <UnityEngine.ParticleSystem, bool>(L, 1)) { UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.ToObject(L, 1); bool arg0 = LuaDLL.lua_toboolean(L, 2); obj.Pause(arg0); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.ParticleSystem.Pause")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int Pause(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (argc == 1) { UnityEngine.ParticleSystem self = (UnityEngine.ParticleSystem)checkSelf(l); self.Pause(); pushValue(l, true); return(1); } else if (argc == 2) { UnityEngine.ParticleSystem self = (UnityEngine.ParticleSystem)checkSelf(l); System.Boolean a1; checkType(l, 2, out a1); self.Pause(a1); pushValue(l, true); return(1); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function to call"); return(2); } catch (Exception e) { return(error(l, e)); } }
static int Pause(IntPtr L) { #if UNITY_EDITOR ToluaProfiler.AddCallRecord("UnityEngine.ParticleSystem.Register"); #endif try { int count = LuaDLL.lua_gettop(L); if (count == 1) { UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.CheckObject(L, 1, typeof(UnityEngine.ParticleSystem)); obj.Pause(); return(0); } else if (count == 2) { UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.CheckObject(L, 1, typeof(UnityEngine.ParticleSystem)); bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.Pause(arg0); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.ParticleSystem.Pause")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
void Start() { controller = new Controller (); controller.EnableGesture (Gesture.GestureType.TYPE_SWIPE); controller.EnableGesture (Gesture.GestureType.TYPE_CIRCLE); controller.EnableGesture (Gesture.GestureType.TYPE_SCREEN_TAP); //for swipe controller.Config.SetFloat ("Gesture.Swipe.MinLength", 200.0f); controller.Config.SetFloat ("Gesture.Swipe.MinVelocity", 750f); //for circle controller.Config.SetFloat ("Gesture.Circle.MinRadius", 80.0f); controller.Config.SetFloat ("Gesture.Circle.MinArc", 1.8f); //for screen tap controller.Config.SetFloat ("Gesture.ScreenTap.MinForwardVelocity", 1.0f); controller.Config.SetFloat ("Gesture.ScreenTap.HistorySeconds", .05f); controller.Config.SetFloat ("Gesture.ScreenTap.MinDistance", 1.0f); controller.Config.Save (); timeLimit = 5.0f; timer = 0.0f; p = GameObject.Find ("ps").GetComponent<ParticleSystem> (); before = GameObject.Find ("before").GetComponent<SpriteRenderer> (); after = GameObject.Find ("after").GetComponent<SpriteRenderer> (); after.color = new Color (255, 255, 255, 0); p.Pause (); }
// Use this for initialization void Start () { this.attackspeed = .5f; particles = GetComponent<ParticleSystem> (); particles.Pause (); this.Power = 20; this.range = 30; this.upgradeCost = 600; }
public void charge(GameObject particles) { partSys = particles.GetComponent<ParticleSystem> (); if (currentBattery < maxBattery) { partSys.Pause (); isCharging = true; } else partSys.Clear (); }
static public int Pause(IntPtr l) { try { UnityEngine.ParticleSystem self = (UnityEngine.ParticleSystem)checkSelf(l); self.Pause(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
public static void ClusterPause(this UnityEngine.ParticleSystem ps) { var observer = validateCheck(ps); if (observer == null) { return; } ps.Pause(); FduParticleSystemOP op = new FduParticleSystemOP(); op.operation = FduParticleSystemOP.Operation.pause; observer.addOperation(op); }
static public int Pause__Boolean(IntPtr l) { try { UnityEngine.ParticleSystem self = (UnityEngine.ParticleSystem)checkSelf(l); System.Boolean a1; checkType(l, 2, out a1); self.Pause(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
// Use this for initialization void Start() { smallJetStream = null; largeJetEmitter = largeJetStream.GetComponent<ParticleSystem> (); largeJetEmitter.Pause (); powerBar.fillAmount = 0; CatAnimator = GetComponent<Animator> (); Player = GetComponent<Rigidbody2D>(); CatAnimator.SetBool("notgrounded", false); grounded = true; time = true; jumpyReady = false; meowSource = WallOfScore.GetComponent<AudioSource> (); }
void Awake() { lights = gameObject.GetComponentsInChildren<Light>(); flames = gameObject.GetComponentInChildren<ParticleSystem>(); if ((row == 0 || row == 2) || (column == 0 || column == 2)) { lights[0].enabled = false; lights[1].enabled = false; lights[2].enabled = false; flames.Pause(); flames.Clear(); isActive = false; } puzzleManager = GameObject.FindObjectOfType<LightsOn>(); }
// Use this for initialization void Start() { //this returns the sibling particle system particleSystem = GetComponent<ParticleSystem>(); spriteRender = GetComponent<SpriteRenderer>(); particleSystem.Pause(); spriteRender.enabled = false; collider2D.enabled = false; rockfallState = 0; timeElapsed = 0; velocity = new Vector3(0, 0, 0); tag = "DamagingHazard"; //run initializations for the base class base.Start(); }
public static void ClusterPause(this UnityEngine.ParticleSystem ps, bool withChildren) { var observer = validateCheck(ps); if (observer == null) { return; } ps.Pause(withChildren); FduParticleSystemOP op = new FduParticleSystemOP(); op.operation = FduParticleSystemOP.Operation.pause; op.paras = new object[1]; op.paras[0] = withChildren; observer.addOperation(op); }
public override void OnEnter() { GameObject go = Fsm.GetOwnerDefaultTarget(gameObject); if (go == null) { return; } _ps = go.GetComponent<ParticleSystem>(); if (_ps == null) { return; } _ps.Pause(); Finish(); }
static public int Pause(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==1){ UnityEngine.ParticleSystem self=(UnityEngine.ParticleSystem)checkSelf(l); self.Pause(); pushValue(l,true); return 1; } else if(argc==2){ UnityEngine.ParticleSystem self=(UnityEngine.ParticleSystem)checkSelf(l); System.Boolean a1; checkType(l,2,out a1); self.Pause(a1); pushValue(l,true); return 1; } pushValue(l,false); LuaDLL.lua_pushstring(l,"No matched override function Pause 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 }
static int Pause(IntPtr L) { int count = LuaDLL.lua_gettop(L); if (count == 1 && ToLua.CheckTypes(L, 1, typeof(UnityEngine.ParticleSystem))) { UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.ToObject(L, 1); try { obj.Pause(); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } return(0); } else if (count == 2 && ToLua.CheckTypes(L, 1, typeof(UnityEngine.ParticleSystem), typeof(bool))) { UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.ToObject(L, 1); bool arg0 = LuaDLL.lua_toboolean(L, 2); try { obj.Pause(arg0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } return(0); } else { LuaDLL.luaL_error(L, "invalid arguments to method: UnityEngine.ParticleSystem.Pause"); } return(0); }
void Start() { m_rgbd2d = GetComponent<Rigidbody2D>(); m_initialPosition = transform.position; m_player = GameObject.FindGameObjectWithTag("Player"); m_characterRGBD = m_player.GetComponent<Rigidbody2D>(); m_BlockSound = GetComponent<AudioSource>(); m_BlockSound.loop = false; if (gameObject.CompareTag("Destructible")) { m_animDestruct = GetComponentInChildren<Animator>(); m_animDestruct.enabled = false; m_particleSystem = GetComponentInChildren<ParticleSystem>(); m_particleSystem.Pause(); m_boxColl = GetComponent<BoxCollider2D>(); } }
private void HandleKeyboardShortcuts(ParticleSystem root) { Event current = Event.current; if (current.type == EventType.KeyDown) { int num = 0; if (current.keyCode == (Event) ParticleEffectUI.kPlay.keyCode) { if (EditorApplication.isPlaying) { this.Stop(); this.Play(); } else if (!ParticleSystemEditorUtils.editorIsPlaying) this.Play(); else this.Pause(); current.Use(); } else if (current.keyCode == (Event) ParticleEffectUI.kStop.keyCode) { this.Stop(); current.Use(); } else if (current.keyCode == (Event) ParticleEffectUI.kReverse.keyCode) num = -1; else if (current.keyCode == (Event) ParticleEffectUI.kForward.keyCode) num = 1; if (num != 0) { ParticleSystemEditorUtils.editorIsScrubbing = true; float editorSimulationSpeed = ParticleSystemEditorUtils.editorSimulationSpeed; ParticleSystemEditorUtils.editorPlaybackTime = Mathf.Max(0.0f, ParticleSystemEditorUtils.editorPlaybackTime + (float) ((!current.shift ? 1.0 : 3.0) * (double) this.m_TimeHelper.deltaTime * (num <= 0 ? -3.0 : 3.0)) * editorSimulationSpeed); if (root.isStopped) { root.Play(); root.Pause(); } ParticleSystemEditorUtils.PerformCompleteResimulation(); current.Use(); } } if (current.type != EventType.KeyUp || current.keyCode != (Event) ParticleEffectUI.kReverse.keyCode && current.keyCode != (Event) ParticleEffectUI.kForward.keyCode) return; ParticleSystemEditorUtils.editorIsScrubbing = false; }
private void HandleKeyboardShortcuts(ParticleSystem root) { Event current = Event.current; if (current.type == EventType.KeyDown) { int num = 0; if (current.keyCode == ParticleEffectUI.kPlay.keyCode) { if (EditorApplication.isPlaying) { this.Stop(); this.Play(); } else { if (!ParticleSystemEditorUtils.editorIsPlaying) { this.Play(); } else { this.Pause(); } } current.Use(); } else { if (current.keyCode == ParticleEffectUI.kStop.keyCode) { this.Stop(); current.Use(); } else { if (current.keyCode == ParticleEffectUI.kReverse.keyCode) { num = -1; } else { if (current.keyCode == ParticleEffectUI.kForward.keyCode) { num = 1; } } } } if (num != 0) { ParticleSystemEditorUtils.editorIsScrubbing = true; float editorSimulationSpeed = ParticleSystemEditorUtils.editorSimulationSpeed; float num2 = ((!current.shift) ? 1f : 3f) * this.m_TimeHelper.deltaTime * ((num <= 0) ? -3f : 3f); ParticleSystemEditorUtils.editorPlaybackTime = Mathf.Max(0f, ParticleSystemEditorUtils.editorPlaybackTime + num2 * editorSimulationSpeed); if (root.isStopped) { root.Play(); root.Pause(); } ParticleSystemEditorUtils.PerformCompleteResimulation(); current.Use(); } } if (current.type == EventType.KeyUp && (current.keyCode == ParticleEffectUI.kReverse.keyCode || current.keyCode == ParticleEffectUI.kForward.keyCode)) { ParticleSystemEditorUtils.editorIsScrubbing = false; } }
internal void PlayBackTimeGUI(ParticleSystem root) { if (root == null) { root = ParticleSystemEditorUtils.GetRoot(this.m_SelectedParticleSystem); } EventType type = Event.current.type; int hotControl = GUIUtility.hotControl; string kFloatFieldFormatString = EditorGUI.kFloatFieldFormatString; EditorGUI.BeginChangeCheck(); EditorGUI.kFloatFieldFormatString = ParticleEffectUI.s_Texts.secondsFloatFieldFormatString; float num = EditorGUILayout.FloatField(ParticleEffectUI.s_Texts.previewTime, ParticleSystemEditorUtils.editorPlaybackTime, new GUILayoutOption[0]); EditorGUI.kFloatFieldFormatString = kFloatFieldFormatString; if (EditorGUI.EndChangeCheck()) { if (type == EventType.MouseDrag) { ParticleSystemEditorUtils.editorIsScrubbing = true; float editorSimulationSpeed = ParticleSystemEditorUtils.editorSimulationSpeed; float editorPlaybackTime = ParticleSystemEditorUtils.editorPlaybackTime; float num2 = num - editorPlaybackTime; num = editorPlaybackTime + num2 * (0.05f * editorSimulationSpeed); } num = Mathf.Max(num, 0f); ParticleSystemEditorUtils.editorPlaybackTime = num; if (root.isStopped) { root.Play(); root.Pause(); } ParticleSystemEditorUtils.PerformCompleteResimulation(); } if (type == EventType.MouseDown && GUIUtility.hotControl != hotControl) { this.m_IsDraggingTimeHotControlID = GUIUtility.hotControl; ParticleSystemEditorUtils.editorIsScrubbing = true; } if (this.m_IsDraggingTimeHotControlID != -1 && GUIUtility.hotControl != this.m_IsDraggingTimeHotControlID) { this.m_IsDraggingTimeHotControlID = -1; ParticleSystemEditorUtils.editorIsScrubbing = false; } }
internal void PlayBackTimeGUI(ParticleSystem root) { if (root == null) { root = ParticleSystemEditorUtils.GetRoot(this.m_SelectedParticleSystem); } EventType type = Event.current.type; int hotControl = GUIUtility.hotControl; string kFloatFieldFormatString = EditorGUI.kFloatFieldFormatString; EditorGUI.BeginChangeCheck(); EditorGUI.kFloatFieldFormatString = s_Texts.secondsFloatFieldFormatString; float a = EditorGUILayout.FloatField(s_Texts.previewTime, ParticleSystemEditorUtils.editorPlaybackTime, new GUILayoutOption[0]); EditorGUI.kFloatFieldFormatString = kFloatFieldFormatString; if (EditorGUI.EndChangeCheck()) { if (type == EventType.MouseDrag) { ParticleSystemEditorUtils.editorIsScrubbing = true; float editorSimulationSpeed = ParticleSystemEditorUtils.editorSimulationSpeed; float editorPlaybackTime = ParticleSystemEditorUtils.editorPlaybackTime; float num5 = a - editorPlaybackTime; a = editorPlaybackTime + (num5 * (0.05f * editorSimulationSpeed)); } ParticleSystemEditorUtils.editorPlaybackTime = Mathf.Max(a, 0f); if (root.isStopped) { root.Play(); root.Pause(); } ParticleSystemEditorUtils.PerformCompleteResimulation(); } if ((type == EventType.MouseDown) && (GUIUtility.hotControl != hotControl)) { this.m_IsDraggingTimeHotControlID = GUIUtility.hotControl; ParticleSystemEditorUtils.editorIsScrubbing = true; } if ((this.m_IsDraggingTimeHotControlID != -1) && (GUIUtility.hotControl != this.m_IsDraggingTimeHotControlID)) { this.m_IsDraggingTimeHotControlID = -1; ParticleSystemEditorUtils.editorIsScrubbing = false; } EditorGUILayout.FloatField(s_Texts.particleCount, (float) this.m_SelectedParticleSystem.particleCount, new GUILayoutOption[0]); int count = 0; if (this.m_SelectedParticleSystem.CountSubEmitterParticles(ref count)) { EditorGUILayout.FloatField(s_Texts.subEmitterParticleCount, (float) count, new GUILayoutOption[0]); } }
void Start() { ps = gameObject.GetComponentInChildren<ParticleSystem>(); if (ps != null) ps.Pause(); }