12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- //================================================================================
- //
- //================================================================================
- using UnityEngine;
- using System.Collections;
- //================================================================================
- //
- //================================================================================
- namespace ReaderRabbit
- {
- //================================================================================
- //
- //================================================================================
- public class SceneRaingearIslandRainbow : SceneCommon
- {
- //================================================================================
- //
- //================================================================================
- [SerializeField] private RainbowAnimation m_RainbowAnimation;
- //================================================================================
- //
- //================================================================================
- protected override void Start()
- {
- base.Start();
- //============================================================================
- //
- //============================================================================
- int lang = PlayerPrefs.GetInt("language");
- if (lang == 0)
- m_SpeechFolder = "Resources_DA/Audio/RaingearIslandRainbow_Speech";
- else if (lang == 1)
- m_SpeechFolder = "Resources_EN/Audio/RaingearIslandRainbow_Speech";
- else if (lang == 2)
- m_SpeechFolder = "Resources_NO/Audio/RaingearIslandRainbow_Speech";
- else if (lang == 3)
- m_SpeechFolder = "Resources_SP/Audio/RaingearIslandRainbow_Speech";
- else if (lang == 4)
- m_SpeechFolder = "Resources_SW/Audio/RaingearIslandRainbow_Speech";
- //============================================================================
- //
- //============================================================================
- m_RainbowAnimation.SetOnAnimatorFinishedCallback(GotoNavigation);
- }
- //================================================================================
- //
- //================================================================================
- protected override void PlayFirstEvent()
- {
- if (PlayerData.Instance().RGIR_Direction == 1) // Going up the rainbow.
- {
- m_RainbowAnimation.TriggerAnimation(true);
- }
- else if (PlayerData.Instance().RGIR_Direction == 2) // Going down the rainbow.
- {
- m_RainbowAnimation.TriggerAnimation(false);
- }
- }
- //================================================================================
- //
- //================================================================================
- void GotoNavigation()
- {
- string navigation = "";
- if (PlayerData.Instance().RGIR_Direction == 1) // Going up the rainbow.
- {
- navigation = "DowntownCloudNine";
- }
- else if (PlayerData.Instance().RGIR_Direction == 2) // Going down the rainbow.
- {
- navigation = "RockHead";
- }
- if (!string.IsNullOrEmpty(navigation))
- {
- PlayerData.Instance().RGIR_Direction = 0;
- KishiTechUnity.Loading.Loading.Instance().Show();
- SetCurrentToNavigation(navigation);
- OnNavigation();
- }
- }
- } // public class SceneRaingearIslandRainbow : SceneCommon
- } // namespace ReaderRabbit
|