| | |
| | | } |
| | | } |
| | | |
| | | public void DoEnterShow() |
| | | public void SwitchToWarrior(bool immediately) |
| | | { |
| | | WindowCenter.Instance.Close<CreateRoleWin>(); |
| | | cameraAnimator.Play(m_CameraParams.enterShow); |
| | | m_Warrior.gameObject.SetActive(true); |
| | | m_Warrior.DoEnterShow(); |
| | | } |
| | | |
| | | public void SwitchToWarrior() |
| | | { |
| | | WindowCenter.Instance.Close<CreateRoleWin>(); |
| | | cameraAnimator.Play(m_CameraParams.magicToWarrior); |
| | | cameraAnimator.Play(m_CameraParams.magicToWarrior, 0, immediately ? 1f : 0f); |
| | | m_Magic.ReleaseEffects(); |
| | | m_Warrior.ReleaseEffects(); |
| | | |
| | | StopCoroutine("Co_SwitchToWarrior"); |
| | | StartCoroutine("Co_SwitchToWarrior"); |
| | | StartCoroutine("Co_SwitchToWarrior", immediately ? 0f : m_CameraParams.magicToWarriorTime); |
| | | } |
| | | |
| | | public void SwitchToMagic() |
| | | public void SwitchToMagic(bool immediately) |
| | | { |
| | | WindowCenter.Instance.Close<CreateRoleWin>(); |
| | | cameraAnimator.Play(m_CameraParams.warriorToMagic); |
| | | cameraAnimator.Play(m_CameraParams.warriorToMagic, 0, immediately?1f:0f); |
| | | m_Magic.ReleaseEffects(); |
| | | m_Warrior.ReleaseEffects(); |
| | | |
| | | StopCoroutine("Co_SwitchToMagic"); |
| | | StartCoroutine("Co_SwitchToMagic"); |
| | | StartCoroutine("Co_SwitchToMagic", immediately ? 0f : m_CameraParams.warriorToMagicTime); |
| | | } |
| | | |
| | | IEnumerator Co_SwitchToWarrior() |
| | | IEnumerator Co_SwitchToWarrior(float waitTime) |
| | | { |
| | | m_Warrior.gameObject.SetActive(true); |
| | | yield return WaitingForSecondConst.WaitMS1000; |
| | | |
| | | yield return new WaitForSeconds(waitTime); |
| | | m_Magic.gameObject.SetActive(false); |
| | | m_Warrior.gameObject.SetActive(true); |
| | | m_Warrior.DoRoutineShow(); |
| | | } |
| | | |
| | | IEnumerator Co_SwitchToMagic() |
| | | IEnumerator Co_SwitchToMagic(float waitTime) |
| | | { |
| | | yield return WaitingForSecondConst.WaitMS1000; |
| | | yield return new WaitForSeconds(waitTime); |
| | | m_Warrior.gameObject.SetActive(false); |
| | | m_Magic.gameObject.SetActive(true); |
| | | m_Magic.DoRoutineShow(); |
| | |
| | | public struct CameraParams |
| | | { |
| | | public string prefabName; |
| | | public string enterShow; |
| | | public string warriorToMagic; |
| | | public float warriorToMagicTime; |
| | | public string magicToWarrior; |
| | | public float magicToWarriorTime; |
| | | } |
| | | |
| | | |