protected void RunActionControl(int nPlayIndex, int nTransIndex) { NgUtil.LogDevelop("RunActionControl() - nPlayIndex " + nPlayIndex); CancelInvoke(); m_bCalledDelayCreate = false; // ������ �ð��� ���� �����̵��� �ص���... ResumeTimeScale(); // Play --------------------------------------- m_bStartAliveAnimation = false; switch (nPlayIndex) { /*AutoRet*/ case 0: break; case 1: break; /*OneShot*/ case 2: SetTimeScale(m_fPlayToolbarTimes[nPlayIndex]); break; /*Repeat*/ case m_nRepeatIndex: case m_nRepeatIndex + 1: case m_nRepeatIndex + 2: case m_nRepeatIndex + 3: case m_nRepeatIndex + 4: { // repeat�����̸�.. �̵����� �ɼ��� ����. if (nPlayIndex != m_nPlayIndex) { nTransIndex = 0; } break; } } // Trans --------------------------------------- if (0 < nTransIndex) { // init multishot // if (m_nTransIndex != nTransIndex && (m_nTransIndex != 0 && nTransIndex != 0)) // m_nMultiShotCount = 1; float fTransHalfDist = (Camera.main != null ? (Vector3.Magnitude(Camera.main.transform.position) * 0.8f) : 1) * m_fTransRate; GameObject instEffectObject = FxmTestMain.inst.GetInstanceEffectObject(); GameObject simRoot = NgObject.CreateGameObject(instEffectObject.transform.parent.gameObject, "simulate"); FxmTestSimulate simComponent = simRoot.AddComponent <FxmTestSimulate>(); instEffectObject.transform.parent = simRoot.transform; FxmTestMain.inst.ChangeRoot_InstanceEffectObject(simRoot); simComponent.Init(this, m_nMultiShotCount); switch (nTransIndex) { case 1: // Move { simComponent.SimulateMove(m_nTransAxis, fTransHalfDist, m_fDistPerTime, (m_nRotateIndex == 0)); break; } case 2: // scale { simComponent.SimulateScale(m_nTransAxis, fTransHalfDist * 0.3f, m_fStartPosition, m_fDistPerTime, (m_nRotateIndex == 0)); break; } case 3: // Arc { simComponent.SimulateArc(fTransHalfDist * 0.7f, m_fDistPerTime, (m_nRotateIndex == 0)); break; } case 4: // fall { simComponent.SimulateFall(fTransHalfDist * 0.7f, m_fDistPerTime, (m_nRotateIndex == 0)); break; } case 5: // raise { simComponent.SimulateRaise(fTransHalfDist * 0.7f, m_fDistPerTime, (m_nRotateIndex == 0)); break; } case 6: // circle { simComponent.SimulateCircle(fTransHalfDist * 0.5f, m_fDistPerTime, (m_nRotateIndex == 0)); break; } case 7: // tornado { simComponent.SimulateTornado(fTransHalfDist * 0.3f, fTransHalfDist * 0.7f, m_fDistPerTime, (m_nRotateIndex == 0)); break; } } } // �̵�ó�����̸�... �ڵ��ݺ��ǹǷ� ����repeat�ɼ��� ����. if (0 < nTransIndex) { if (m_nRepeatIndex <= nPlayIndex) { nPlayIndex = 0; } } // ���� ������ ���� m_nPlayIndex = nPlayIndex; m_nTransIndex = nTransIndex; if (IsRepeat()) { m_fCreateTime = Time.time; } }
protected void RunActionControl(int nPlayIndex, int nTransIndex) { NgUtil.LogDevelop("RunActionControl() - nPlayIndex " + nPlayIndex); base.CancelInvoke(); this.m_bCalledDelayCreate = false; this.ResumeTimeScale(); this.m_bStartAliveAnimation = false; switch (nPlayIndex) { case 2: this.SetTimeScale(this.m_fPlayToolbarTimes[nPlayIndex]); break; case 3: case 4: case 5: case 6: case 7: if (nPlayIndex != this.m_nPlayIndex) { nTransIndex = 0; } break; } if (0 < nTransIndex) { float num = ((!(Camera.main != null)) ? 1f : (Vector3.Magnitude(Camera.main.transform.position) * 0.8f)) * this.m_fTransRate; GameObject instanceEffectObject = FxmTestMain.inst.GetInstanceEffectObject(); GameObject gameObject = NgObject.CreateGameObject(instanceEffectObject.transform.parent.gameObject, "simulate"); FxmTestSimulate fxmTestSimulate = gameObject.AddComponent <FxmTestSimulate>(); instanceEffectObject.transform.parent = gameObject.transform; FxmTestMain.inst.ChangeRoot_InstanceEffectObject(gameObject); fxmTestSimulate.Init(this, this.m_nMultiShotCount); switch (nTransIndex) { case 1: fxmTestSimulate.SimulateMove(this.m_nTransAxis, num, this.m_fDistPerTime, this.m_nRotateIndex == 0); break; case 2: fxmTestSimulate.SimulateScale(this.m_nTransAxis, num * 0.3f, this.m_fStartPosition, this.m_fDistPerTime, this.m_nRotateIndex == 0); break; case 3: fxmTestSimulate.SimulateArc(num * 0.7f, this.m_fDistPerTime, this.m_nRotateIndex == 0); break; case 4: fxmTestSimulate.SimulateFall(num * 0.7f, this.m_fDistPerTime, this.m_nRotateIndex == 0); break; case 5: fxmTestSimulate.SimulateRaise(num * 0.7f, this.m_fDistPerTime, this.m_nRotateIndex == 0); break; case 6: fxmTestSimulate.SimulateCircle(num * 0.5f, this.m_fDistPerTime, this.m_nRotateIndex == 0); break; case 7: fxmTestSimulate.SimulateTornado(num * 0.3f, num * 0.7f, this.m_fDistPerTime, this.m_nRotateIndex == 0); break; } } if (0 < nTransIndex && 3 <= nPlayIndex) { nPlayIndex = 0; } this.m_nPlayIndex = nPlayIndex; this.m_nTransIndex = nTransIndex; if (this.IsRepeat()) { this.m_fCreateTime = Time.time; } }
protected void RunActionControl(int nPlayIndex, int nTransIndex) { NgUtil.LogDevelop("RunActionControl() - nPlayIndex " + nPlayIndex); CancelInvoke("CreateInstanceEffect"); m_bCalledDelayCreate = false; // 정지된 시계일 경우 움직이도록 해두자... ResumeTimeScale(); // Play --------------------------------------- m_bStartAliveAnimation = false; switch (nPlayIndex) { /*AutoRet*/ case 0: break; case 1: break; /*OneShot*/ case 2: SetTimeScale(m_fPlayToolbarTimes[nPlayIndex]); break; /*Repeat*/ case m_nRepeatIndex: case m_nRepeatIndex + 1: case m_nRepeatIndex + 2: case m_nRepeatIndex + 3: case m_nRepeatIndex + 4: { // repeat선택이면.. 이동관련 옵션을 끈다. if (nPlayIndex != m_nPlayIndex) { nTransIndex = 0; } break; } } // Trans --------------------------------------- if (0 < nTransIndex) { // init multishot // if (m_nTransIndex != nTransIndex && (m_nTransIndex != 0 && nTransIndex != 0)) // m_nMultiShotCount = 1; float fTransHalfDist = (Camera.mainCamera != null ? (Vector3.Magnitude(Camera.mainCamera.transform.position) * 0.65f) : 1) * m_fTransRate; GameObject instEffectObject = FXMakerMain.inst.GetInstanceEffectObject(); GameObject simRoot = NgObject.CreateGameObject(instEffectObject.transform.parent.gameObject, "simulate"); FXMakerSimulate simComponent = simRoot.AddComponent <FXMakerSimulate>(); instEffectObject.transform.parent = simRoot.transform; FXMakerMain.inst.ChangeRoot_InstanceEffectObject(simRoot); simComponent.Init(this, m_nMultiShotCount); switch (nTransIndex) { case 1: // Move { simComponent.SimulateMove(m_nTransAxis, fTransHalfDist, FXMakerOption.inst.m_fScaleTransSpeed * m_fDistPerTime, (m_nRotateIndex == 0)); break; } case 2: // scale { simComponent.SimulateScale(m_nTransAxis, fTransHalfDist * 0.3f, FXMakerOption.inst.m_fScaleTransSpeed * m_fDistPerTime, (m_nRotateIndex == 0)); break; } case 3: // Arc { simComponent.SimulateArc(fTransHalfDist * 0.7f, FXMakerOption.inst.m_fScaleTransSpeed * m_fDistPerTime, (m_nRotateIndex == 0)); break; } case 4: // fall { simComponent.SimulateFall(fTransHalfDist * 0.7f, FXMakerOption.inst.m_fScaleTransSpeed * m_fDistPerTime, (m_nRotateIndex == 0)); break; } case 5: // raise { simComponent.SimulateRaise(fTransHalfDist * 0.7f, FXMakerOption.inst.m_fScaleTransSpeed * m_fDistPerTime, (m_nRotateIndex == 0)); break; } case 6: // circle { simComponent.SimulateCircle(fTransHalfDist * 0.5f, FXMakerOption.inst.m_fScaleTransSpeed * m_fDistPerTime, (m_nRotateIndex == 0)); break; } case 7: // tornado { simComponent.SimulateTornado(fTransHalfDist * 0.3f, fTransHalfDist * 0.7f, FXMakerOption.inst.m_fScaleTransSpeed * m_fDistPerTime, (m_nRotateIndex == 0)); break; } } } // 이동처리중이면... 자동반복되므로 기존repeat옵션은 끈다. if (0 < nTransIndex) { if (m_nRepeatIndex <= nPlayIndex) { nPlayIndex = 0; } } // 최족 결정값 저장 m_nPlayIndex = nPlayIndex; m_nTransIndex = nTransIndex; if (IsRepeat()) { m_fCreateTime = Time.time; } }