// ------------------------------------------------------------------------------------------- public string[] GetPlayContents() { int nRepeatIndex = 3; GUIContent[] cons = FxmTestControls.GetHcEffectControls_Play(0, 0, m_fPlayToolbarTimes[1], m_fPlayToolbarTimes[nRepeatIndex], m_fPlayToolbarTimes[nRepeatIndex + 1], m_fPlayToolbarTimes[nRepeatIndex + 2], m_fPlayToolbarTimes[nRepeatIndex + 3], m_fPlayToolbarTimes[nRepeatIndex + 4]); return(NgConvert.ContentsToStrings(cons)); }
public string[] GetPlayContents() { int num = 3; GUIContent[] hcEffectControls_Play = FxmTestControls.GetHcEffectControls_Play(0f, 0f, this.m_fPlayToolbarTimes[1], this.m_fPlayToolbarTimes[num], this.m_fPlayToolbarTimes[num + 1], this.m_fPlayToolbarTimes[num + 2], this.m_fPlayToolbarTimes[num + 3], this.m_fPlayToolbarTimes[num + 4]); return(NgConvert.ContentsToStrings(hcEffectControls_Play)); }
private void winActionToolbar(int id) { Rect actionToolbarRect = this.GetActionToolbarRect(); string text = string.Empty; string str = string.Empty; int num = 10; int count = 5; this.m_bMinimize = GUI.Toggle(new Rect(3f, 1f, FXMakerLayout.m_fMinimizeClickWidth, FXMakerLayout.m_fMinimizeClickHeight), this.m_bMinimize, "Mini"); if (GUI.changed) { PlayerPrefs.SetInt("FxmTestControls.m_bMinimize", (!this.m_bMinimize) ? 0 : 1); } GUI.changed = false; Rect childVerticalRect; Rect innerHorizontalRect; if (FXMakerLayout.m_bMinimizeAll || this.m_bMinimize) { count = 1; childVerticalRect = FXMakerLayout.GetChildVerticalRect(actionToolbarRect, 0, count, 0, 1); if (FxmTestMain.inst.IsCurrentEffectObject()) { text = string.Format("P={0} M={1} T={2}", this.m_nParticleCount, this.m_nMeshCount, this.m_nTriangles); str = string.Format("ParticleCount = {0} MeshCount = {1}\n Mesh: Triangles = {2} Vertices = {3}", new object[] { this.m_nParticleCount, this.m_nMeshCount, this.m_nTriangles, this.m_nVertices }); } GUI.Box(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 0, 2), text); if (FxmTestMain.inst.IsCurrentEffectObject()) { float rightValue = (3 > this.m_nPlayIndex) ? 10f : this.m_fPlayToolbarTimes[this.m_nPlayIndex]; childVerticalRect = FXMakerLayout.GetChildVerticalRect(actionToolbarRect, 0, count, 0, 1); GUI.Box(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 2, 2), "ElapsedTime " + (Time.time - this.m_fPlayStartTime).ToString("0.000")); innerHorizontalRect = FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 4, 4); innerHorizontalRect.y += 5f; GUI.HorizontalSlider(innerHorizontalRect, Time.time - this.m_fPlayStartTime, 0f, rightValue); childVerticalRect = FXMakerLayout.GetChildVerticalRect(actionToolbarRect, 0, count, 0, 1); if (GUI.Button(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 8, 2), "Restart")) { this.CreateInstanceEffect(); } } return; } childVerticalRect = FXMakerLayout.GetChildVerticalRect(actionToolbarRect, 0, count, 0, 2); if (NcEffectBehaviour.GetRootInstanceEffect()) { text = string.Format("P = {0}\nM = {1}\nT = {2}", this.m_nParticleCount, this.m_nMeshCount, this.m_nTriangles); str = string.Format("ParticleCount = {0} MeshCount = {1}\n Mesh: Triangles = {2} Vertices = {3}", new object[] { this.m_nParticleCount, this.m_nMeshCount, this.m_nTriangles, this.m_nVertices }); } GUI.Box(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 0, 1), new GUIContent(text, this.NgTooltipTooltip(str))); if (FxmTestMain.inst.IsCurrentEffectObject()) { bool flag = false; GUIContent[] hcEffectControls_Play = FxmTestControls.GetHcEffectControls_Play(0f, this.m_fTimeScale, this.m_fPlayToolbarTimes[1], this.m_fPlayToolbarTimes[3], this.m_fPlayToolbarTimes[4], this.m_fPlayToolbarTimes[5], this.m_fPlayToolbarTimes[6], this.m_fPlayToolbarTimes[7]); childVerticalRect = FXMakerLayout.GetChildVerticalRect(actionToolbarRect, 0, count, 0, 1); GUI.Box(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 1, 1), new GUIContent("Play", string.Empty)); int nPlayIndex = GUI.SelectionGrid(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 2, 8), this.m_nPlayIndex, hcEffectControls_Play, hcEffectControls_Play.Length); if (GUI.changed) { flag = true; } GUIContent[] hcEffectControls_Trans = FxmTestControls.GetHcEffectControls_Trans(this.m_nTransAxis); childVerticalRect = FXMakerLayout.GetChildVerticalRect(actionToolbarRect, 0, count, 1, 1); GUI.Box(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 1, 1), new GUIContent("Trans", string.Empty)); int num2 = GUI.SelectionGrid(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 2, 8), this.m_nTransIndex, hcEffectControls_Trans, hcEffectControls_Trans.Length); if (GUI.changed) { flag = true; if ((num2 == 1 || num2 == 2) && Input.GetMouseButtonUp(1)) { if (this.m_nTransAxis == FxmTestControls.AXIS.Z) { this.m_nTransAxis = FxmTestControls.AXIS.X; } else { this.m_nTransAxis++; } PlayerPrefs.SetInt("FxmTestControls.m_nTransAxis", (int)this.m_nTransAxis); } } if (flag) { FxmTestMain.inst.CreateCurrentInstanceEffect(false); this.RunActionControl(nPlayIndex, num2); PlayerPrefs.SetInt("FxmTestControls.m_nPlayIndex", this.m_nPlayIndex); PlayerPrefs.SetInt("FxmTestControls.m_nTransIndex", this.m_nTransIndex); } } float num3 = this.m_fDistPerTime; childVerticalRect = FXMakerLayout.GetChildVerticalRect(actionToolbarRect, 0, count, 2, 1); GUIContent gUIContent = new GUIContent("DistPerTime", string.Empty); GUIContent expr_471 = gUIContent; expr_471.text = expr_471.text + " " + this.m_fDistPerTime.ToString("00.00"); GUI.Box(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 0, 2), gUIContent); innerHorizontalRect = FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 2, 5); innerHorizontalRect.y += 5f; num3 = GUI.HorizontalSlider(innerHorizontalRect, num3, 0.1f, 40f); if (GUI.Button(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num * 2, 14, 1), new GUIContent("<", string.Empty))) { num3 = (float)((int)(num3 - 1f)); } if (GUI.Button(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num * 2, 15, 1), new GUIContent(">", string.Empty))) { num3 = (float)((int)(num3 + 1f)); } if (num3 != this.m_fDistPerTime) { this.m_fDistPerTime = ((num3 != 0f) ? num3 : 0.1f); PlayerPrefs.SetFloat("FxmTestControls.m_fDistPerTime", this.m_fDistPerTime); if (0 < this.m_nTransIndex) { this.CreateInstanceEffect(); } } if (NgLayout.GUIButton(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 9, 1), new GUIContent("Multi", this.m_nMultiShotCount.ToString()), true)) { if (Input.GetMouseButtonUp(0)) { this.m_nMultiShotCount++; if (4 < this.m_nMultiShotCount) { this.m_nMultiShotCount = 1; } } else { this.m_nMultiShotCount = 1; } this.CreateInstanceEffect(); } GUIContent[] hcEffectControls_Rotate = FxmTestControls.GetHcEffectControls_Rotate(); childVerticalRect = FXMakerLayout.GetChildVerticalRect(actionToolbarRect, 0, count, 2, 1); int num4 = GUI.SelectionGrid(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 8, 1), this.m_nRotateIndex, hcEffectControls_Rotate, hcEffectControls_Rotate.Length); if (num4 != this.m_nRotateIndex) { this.m_nRotateIndex = num4; PlayerPrefs.SetInt("FxmTestControls.m_nRotateIndex", this.m_nRotateIndex); if (0 < this.m_nTransIndex) { this.CreateInstanceEffect(); } } float num5 = this.m_fTimeScale; childVerticalRect = FXMakerLayout.GetChildVerticalRect(actionToolbarRect, 0, count, 3, 1); gUIContent = new GUIContent("TimeScale", string.Empty); GUIContent expr_681 = gUIContent; expr_681.text = expr_681.text + " " + this.m_fTimeScale.ToString("0.00"); GUI.Box(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 0, 2), gUIContent); innerHorizontalRect = FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 2, 5); innerHorizontalRect.y += 5f; num5 = GUI.HorizontalSlider(innerHorizontalRect, num5, 0f, 3f); if (num5 == 0f) { if (GUI.Button(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 7, 1), new GUIContent("Resume", string.Empty))) { num5 = this.m_fOldTimeScale; } } else if (GUI.Button(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 7, 1), new GUIContent("Pause", string.Empty))) { num5 = 0f; } if (GUI.Button(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 8, 1), new GUIContent("Reset", string.Empty))) { num5 = 1f; } this.SetTimeScale(num5); if (FxmTestMain.inst.IsCurrentEffectObject()) { float rightValue2 = (3 > this.m_nPlayIndex) ? 10f : this.m_fPlayToolbarTimes[this.m_nPlayIndex]; childVerticalRect = FXMakerLayout.GetChildVerticalRect(actionToolbarRect, 0, count, 4, 1); gUIContent = new GUIContent("ElapsedTime", string.Empty); GUIContent expr_7D4 = gUIContent; expr_7D4.text = expr_7D4.text + " " + (Time.time - this.m_fPlayStartTime).ToString("0.000"); GUI.Box(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 0, 2), gUIContent); innerHorizontalRect = FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 2, 5); innerHorizontalRect.y += 5f; GUI.HorizontalSlider(innerHorizontalRect, Time.time - this.m_fPlayStartTime, 0f, rightValue2); if (GUI.Button(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num * 2, 14, 1), new GUIContent("+.5", string.Empty))) { this.SetTimeScale(1f); base.Invoke("invokeStopTimer", 0.5f); } if (GUI.Button(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num * 2, 15, 1), new GUIContent("+.1", string.Empty))) { this.SetTimeScale(0.4f); base.Invoke("invokeStopTimer", 0.1f); } if (GUI.Button(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num * 2, 16, 1), new GUIContent("+.05", string.Empty))) { this.SetTimeScale(0.2f); base.Invoke("invokeStopTimer", 0.05f); } if (GUI.Button(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num * 2, 17, 1), new GUIContent("+.01", string.Empty))) { this.SetTimeScale(0.04f); base.Invoke("invokeStopTimer", 0.01f); } childVerticalRect = FXMakerLayout.GetChildVerticalRect(actionToolbarRect, 0, count, 3, 2); if (GUI.Button(FXMakerLayout.GetInnerHorizontalRect(childVerticalRect, num, 9, 1), new GUIContent("Restart", string.Empty))) { this.CreateInstanceEffect(); } } }